tidyverts / feasts

Feature Extraction And Statistics for Time Series
https://feasts.tidyverts.org/
291 stars 23 forks source link

gg_subseries() incorrectly uses lubridate::floor_date() #92

Closed mitchelloharawild closed 4 years ago

mitchelloharawild commented 4 years ago

Seasonalities can be misaligned due to incorrectly assuming that these two calls give the same result:

library(lubridate)
#> 
#> Attaching package: 'lubridate'
#> The following object is masked from 'package:base':
#> 
#>     date
floor_date(ymd("2011-01-29"), "week")
#> [1] "2011-01-23"
floor_date(ymd("2011-01-29"), days(7))
#> [1] "2011-01-29"

Created on 2020-03-04 by the reprex package (v0.3.0)