tsibble icon indicating copy to clipboard operation
tsibble copied to clipboard

Loading the {tsibble} package causes an error with {stats}

Open AndrewKostandy opened this issue 2 years ago • 0 comments

Thank you for your great work with the {tsibble} package.

There appears to be an issue where loading the {tsibble} package (or running some functions from it) causes an error with the {stats} package. This in turn causes an error in other packages that use {stats} such as the {CausalImpact} package.

Below is a reprex from a response post of a collaborator in the {CausalImpact} repo:

This works:

dates <- as.Date(c("2022-01-01", "2022-01-08"))
stats::window(dates, 1)

This fails:

library(tsibble)
stats::window(dates, 1)

Error in seq.int(trunc((start - xtsp[1L]) * xfreq + 1.5), trunc((end - : 'from' must be of length 1

You can also see how this issue causes a problem with the {CausalImpact} package by reading from the below comment onwards: https://github.com/google/CausalImpact/issues/32#issuecomment-1038264276

AndrewKostandy avatar Apr 14 '22 11:04 AndrewKostandy