Skip to content

tk_augment_fourier() not working with yearmon date format #159

Open
@pepenudalg

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions