We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If group_times threshold is minutes (e.g. 5 minutes), we aren't grouping to the nearest hour if we are nearer to next hour than e.g. 55 minutes.
group_times
Example:
DT <- data.table( idate = as.IDate('2018-12-12'), itime = as.ITime( c('01:00', '01:02', '00:58', '03:00', '03:02', '02:59', '05:00', '05:01', '04:58') ) ) group_times(DT, c('idate', 'itime'), threshold = '5 minutes')
We'd expect here to have 3 timegroups (on 1:00, 3:00 and 5:00). We end up with 6.
Note: this kind of rolling to the nearest hour was addressed for the less frequent, rolling 24 hours to the next day.
Regardless, still miss grouping row 3 and row 9.
DT <- data.table( idate = as.IDate( c('2018-12-12','2018-12-12', '2018-12-12', '2018-12-12','2018-12-12', '2018-12-13', '2018-12-13','2018-12-13', '2018-12-13')), itime = as.ITime( c('22:00', '22:02', '21:58', '23:58', '23:59', '0:01', '2:00', '2:01', '1:58')) ) group_times(DT, c('idate', 'itime'), threshold = '5 minutes')
The text was updated successfully, but these errors were encountered:
Merge pull request #6 from ropensci/bug/nearest-hr-with-mins
a9f82fb
group_times misses nearest hour with mins threshold (fixes #5)
robitalec
No branches or pull requests
If
group_times
threshold is minutes (e.g. 5 minutes), we aren't grouping to the nearest hour if we are nearer to next hour than e.g. 55 minutes.Example:
We'd expect here to have 3 timegroups (on 1:00, 3:00 and 5:00).
We end up with 6.
Note: this kind of rolling to the nearest hour was addressed for the less frequent, rolling 24 hours to the next day.
Regardless, still miss grouping row 3 and row 9.
The text was updated successfully, but these errors were encountered: