When I run the below code, using the tsibble package, I get the error message:
Error: Problem with `mutate()` column `Month`.
i `Month = yearmonth(Month)`.
x function 'Rcpp_precious_remove' not provided by package 'Rcpp'
I tried reinstalling Rcpp, updating Rcpp, and nothing works yet. Can someone please help with this issue?
Code:
library(dplyr)
library(Rcpp)
library(tsibble)
z <- data.frame(
Month = c("2019 Jan","2019 Feb","2019 Mar","2019 Apr","2019 May"),
Observation = c(50,23,34,30,25)
)
z <- as_tibble(z)
z %>%
mutate(Month = yearmonth(Month)) %>%
as_tsibble(index = Month)