tidyverts / tsibble

Tidy Temporal Data Frames and Tools
https://tsibble.tidyverts.org
GNU General Public License v3.0
528 stars 50 forks source link

interval_pull.POSIXt > new_interval is missing arguments for all intervals above hour #237

Closed yogat3ch closed 3 years ago

yogat3ch commented 3 years ago

interval_pull.POSIXt fails when the input vector has interval greater than one hour.

Reprex:

tsibble::interval_pull(lubridate::as_datetime(c("2020-03-30", "2020-03-31", "2020-04-01")))

To fix: #236

earowang commented 3 years ago

If it's daily data, we suggest to use Date to represent instead of POSIXct, which has been documented in https://tsibble.tidyverts.org/reference/tsibble-package.html#index and https://tsibble.tidyverts.org/articles/faq.html

yogat3ch commented 3 years ago

Ok, thanks for sharing the FAQ! I'll re-work my package using these specialized time classes and see if everything works out.