You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use gg_subseries on a tsibble. I noticed what appears to be a bug due to renaming in place. Here is a reproducible example.
# Create monthly data from the
library(feasts)
# Create dates
period <- seq(as.Date("2000-01-01"), as.Date("2016-12-31"), by = "1 month")
# Create some random walk values
set.seed(4)
y <- cumsum(rnorm(length(period)))
df <- data_frame(period = period,
y = y,
country = "ZZ") %>%
# Convert period to a yearmonth object
mutate(period = tsibble::yearmonth(period)) %>%
as_tsibble(key = country, index = period)
df %>%
gg_subseries(y)
# Error: Invalid period name: Jan
When I mutate the period variable to a new name, the error doesn't appear
df2 <- data_frame(period2 = period,
y = y,
country = "ZZ") %>%
# Convert period to a yearmonth object
mutate(period2 = tsibble::yearmonth(period2)) %>%
as_tsibble(key = country, index = period2)
df2 %>%
gg_subseries(y)
The text was updated successfully, but these errors were encountered:
I am trying to use gg_subseries on a tsibble. I noticed what appears to be a bug due to renaming in place. Here is a reproducible example.
When I mutate the period variable to a new name, the error doesn't appear
The text was updated successfully, but these errors were encountered: