I am trying to copy the following output as a tibble/df; but getting error when I use View()
. I believe it is due to the <model>
object -- the variable ARIMA(Trips)
. I tried mutating it as character but failed. How do I make the <model>
object as character? The goal is to obtain the model specification along with relevant data and join them with another data frame.
# library
suppressWarnings(suppressMessages(library(fpp3)))
# Data & Model
tourism %>%
filter(Region %in% c("Melbourne", "Sydney"),
Purpose == "Holiday") %>%
model(ARIMA(Trips))
#> # A mable: 2 x 4
#> # Key: Region, State, Purpose [2]
#> Region State Purpose `ARIMA(Trips)`
#> <chr> <chr> <chr> <model>
#> 1 Melbourne Victoria Holiday <ARIMA(0,1,1) w/ drift>
#> 2 Sydney New South Wales Holiday <ARIMA(1,0,0)(1,0,1)[4] w/ mean>
Created on 2020-09-26 by the reprex package (v0.3.0)