Skip to content

Commit

Permalink
also apply to WW timeseries and fix > sign #1196
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentvanhees committed Sep 20, 2024
1 parent 54a615a commit 536b0b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions R/g.part5.savetimeseries.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ g.part5.savetimeseries = function(ts, LEVELS, desiredtz, rawlevels_fname,
if ((timewindow == "MM" || timewindow == "OO") && last_timestamp < 9) {
mdat$window[which(mdat$window == max(mdat$window))] = 0
}
if (timewindow == "WW" && last_timestamp < 15) {
mdat$window[which(mdat$window == max(mdat$window))] = 0
}
}

# Add invalid day indicator
Expand Down
4 changes: 2 additions & 2 deletions R/g.report.part5.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ g.report.part5 = function(metadatadir = c(), f0 = c(), f1 = c(), loglocation = c
indices = which(x$wear_perc_day >= includeday_wearPercentage &
x$wear_min_day >= includeday_absolute &
x$dur_spt_min > 0 & x$dur_day_min > 0 &
((x$lastnight == TRUE & x$lasttimestamp > 15 & window == "WW") |
(x$lastnight == TRUE & x$lasttimestamp > 9 & window == "OO") |
((x$lastnight == TRUE & x$lasttimestamp >= 15 & window == "WW") |
(x$lastnight == TRUE & x$lasttimestamp >= 9 & window == "OO") |
x$lastnight == FALSE) &
include_window == TRUE &
x$wear_min_day_spt >= minimumValidMinutesMM)
Expand Down

0 comments on commit 536b0b1

Please sign in to comment.