diff --git a/NEWS.md b/NEWS.md index ea194cef6..557424476 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# CHANGES IN GGIR VERSION 3.1-2 + +- Report part 5: fix bug that was introduced on 2024-Feb-19 in the calculation of wear percentage #1148 + # CHANGES IN GGIR VERSION 3.1-1 - Part 2: Corrected calculation of LXhr and MXhr which had one hour offset when timing was after midnight, #1117 diff --git a/R/g.report.part5.R b/R/g.report.part5.R index ce5e0d046..020f8017a 100644 --- a/R/g.report.part5.R +++ b/R/g.report.part5.R @@ -50,7 +50,7 @@ g.report.part5 = function(metadatadir = c(), f0 = c(), f1 = c(), loglocation = c x$wear_min_day_spt = (1 - (x$nonwear_perc_day_spt / 100)) * x$dur_day_spt_min #valid minute during waking hours x$wear_min_day = (1 - (x$nonwear_perc_day / 100)) * x$dur_day_min #valid minute during waking hours - x$wear_perc_day = 100 - (x$nonwear_perc_day / 100) #wear percentage during waking hours + x$wear_perc_day = 100 - x$nonwear_perc_day #wear percentage during waking hours minimumValidMinutesMM = 0 # default if (length(params_cleaning[["includedaycrit"]]) == 2) {