0

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.

Steffen Moritz
  • 7,277
  • 11
  • 36
  • 55
  • Just making sure, you installed `R` base and `RStdio` and the required libraries, `dplyr` and `anomalize`? I can't reproduce the error and probably the libraries didn't load properly? – deepseefan Sep 30 '19 at 13:36
  • So it's not that the libraries didn't load, it executes the library imports done but when it executes the time decompose function, it returns the error in the console. – Theodore Koopman Oct 01 '19 at 16:10

1 Answers1

0

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

Aydin K.
  • 3,309
  • 36
  • 44