You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not really sure why the agument function fails here:
library(fable)
library(tsibble)
library(dplyr)
y <- c(878.6, 866.4, 864.9, 1017.8, 1029.5, 961.5, 896.2)
h <- 2
z <- length(y) - h
df_bl <- tibble(x = seq.int(1, length(y)), y = y) |> as_tsibble(index = x)
# Split data into training and test
df_train <- df_bl |> filter(x <= z)
df_test <- df_bl |> filter(x > z)
df_train |>
as_tsibble(index = x) |>
model(lm = TSLM(y ~ trend())) |>
augment()
Error in `mutate()`:
ℹ In argument: `dplyr::across(...)`.
Caused by error in `across()`:
! Can't compute column `lm`.
Caused by error in `mutate()`:
ℹ In argument: `.fitted = fitted(x, ...)[[".fitted"]]`.
Caused by error in `object$fitted`:
! $ operator is invalid for atomic vectors
Run `rlang::last_trace()` to see where the error occurred.
Not really sure why the agument function fails here:
Just plotting works:
The text was updated successfully, but these errors were encountered: