diff --git a/NEWS.md b/NEWS.md index 33e2d76bf..3160fd0a3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,8 @@ - Report part 5: fix bug that was introduced on 2024-Feb-19 in the calculation of wear percentage #1148 +- Report part 5: Rename variable sleep_efficiency to sleep_efficiency_after_onset, #1157 + - Vignette: Migrated many sections from main CRAN vignette to wadpac.github.io/GGIR/ # CHANGES IN GGIR VERSION 3.1-1 diff --git a/R/g.part5_analyseSegment.R b/R/g.part5_analyseSegment.R index 12c242a5d..f806da8a2 100644 --- a/R/g.part5_analyseSegment.R +++ b/R/g.part5_analyseSegment.R @@ -186,7 +186,7 @@ g.part5_analyseSegment = function(indexlog, timeList, levelList, # sleep efficiency dsummary[si,fi] = length(which(ts$sibdetection[sse] == 1 & ts$diur[sse] == 1)) / length(which(ts$diur[sse] == 1)) - ds_names[fi] = "sleep_efficiency"; fi = fi + 1 + ds_names[fi] = "sleep_efficiency_after_onset"; fi = fi + 1 #=============================================== # NAPS (estimation) if (params_output[["do.sibreport"]] == TRUE & "nap1_nonwear2" %in% colnames(ts) &