Skip to content
New issue

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

tk_augment_fourier() not working with yearmon date format #159

Open
pepenudalg opened this issue Oct 30, 2023 · 0 comments
Open

tk_augment_fourier() not working with yearmon date format #159

pepenudalg opened this issue Oct 30, 2023 · 0 comments

Comments

@pepenudalg
Copy link

tk_augment_fourier() results in the following error when the date column is formatted as yearmon:

Error in charToDate(x) : character string is not in a standard unambiguous format

Reproducible example:

library(tidyverse)  
library(timetk)  
library(zoo)  
t <- data.frame(date = seq.Date(from = ymd("2010-01-01"),
                                to = ymd("2020-01-01"),
                                by = "month")) %>%
           mutate(date = as.yearmon(date)) %>% 
  tk_augment_fourier(.date_var = date, .periods = 12,  .K = 3)
t

I am using timetk_2.8.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant