I am receiving an error when running a time_decompose function from the anomalize library in R

180 Views Asked by At

After installing R base and R studio, and running the standard example from: https://www.rdocumentation.org/packages/anomalize/versions/0.1.1/topics/time_decompose.

I get the error:

Error in !.key : invalid argument type

I tried using the as_tibble and as_tbl_time functions to prepare data to no avail, getting the same error.

library(tidyverse)
library(tibbletime)
library(anomalize)
library(dplyr)

data(tidyverse_cran_downloads)

# Basic Usage
tidyverse_cran_downloads %>%
  time_decompose(count, method = "stl")

I expected to see a time decomposed object but get the error message, noted above.

1

There are 1 best solutions below

0
On

Most probably you're hitting a compatibility mismatch between tidyverse and anomalize.

Find a workaround (downgrade) and details here: https://github.com/business-science/anomalize/issues/40