Anomalize Package in R -> Error in mutate_impl(.data, dots)

453 Views Asked by At

After looking at all the related post, I have yet to find an acceptable working solution. Thus, I decided to try and ask again!

Error in mutate_impl(.data, dots) : Evaluation error: Only year, quarter, month, week, and day periods are allowed for an index of class Date

test_long$Date <- as.Date(test_long$Date, "%m-%d-%Y")

test_long %>% + time_decompose(count) %>% + anomalize(remainder) %>% + time_recompose() %>% + plot_anomalies(time_recomposed = TRUE, ncol=3, alpha_dots = 0.25)

Note: Index not ordered. tibbletime assumes index is in ascending order. Results may not be as desired.

Error in mutate_impl(.data, dots) : Evaluation error: Only year, quarter, month, week, and day periods are allowed for an index of class Date.

str(test_long$Date) Date[1:5719], format: "2016-01-27" "2016-01-28" "2016-01-29" "2016-01-30" "2016-01-31" "2016-02-01" "2016-02-02" "2016-02-03" "2016-02-04" "2016-02-05" "2016-02-06" ...

I apologize in advance if this post isn't sufficiently clear. This is my first post.

0

There are 0 best solutions below