diff --git a/docs/change-log.md b/docs/change-log.md index 657c1d3f..095c8d66 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -2,6 +2,7 @@ ## v1.9.4 +- Fix bug in process_location_types.R script that allowed for <1 minute time differences between a final resampled row and the next sensed location row - Fix bug in PHONE_BATTERY RAPIDS provider that could result in negative values for battery consumption rate features - Fix bug in PHONE_APPLICATIONS_FOREGROUND RAPIDS provider that could result in some rows being excluded from output depending on order in which apps are processed - Fix bug in PHONE_SCREEN RAPIDS provider that dropped rows exceeding specified thresholds based on within-segment rather than overall episode duration diff --git a/src/data/process_location_types.R b/src/data/process_location_types.R index 13b867ce..c9ac7f2e 100644 --- a/src/data/process_location_types.R +++ b/src/data/process_location_types.R @@ -71,6 +71,8 @@ if(locations_to_use == "ALL"){ id = id -1, timestamp = timestamp + (id * 60000)) %>% ungroup() %>% + # drop last resampled row from a group if there is not at least 1 minute between its timestamp and the following sensed location timestamp + filter(!(provider == "resampled" & !is.na(lead(timestamp)) & lead(timestamp) - timestamp < 60000)) %>% select(-resample_group, -limit, -id) } else { processed_locations <- locations