Hi! I am having difficulty knitting R with the following codes. The function accuracy () works properly to give its outputs in an rmd file, but when I attempted to knit it, I received the error depicted in the image below.
I thought accuracy is a function that takes both forecast and ts objects.. I have no clue what is going on here.
Any help will be much appreciated!
w_data = writing
library(e1071)
library(caret)
library(forecast)
library(dplyr)
w_training = window(w_data, start=1968, end=c(1975,12))
w_test = window(w_data, start = 1976)
naive_test = stlf(w_training,t.window=13,lambda = BoxCox.lambda(w_training),s.window="periodic",robust=TRUE,method="naive",h=length(w_test))
accuracy(naive_test, w_test)
rwdrift_test = stlf(w_training,t.window=13,lambda = BoxCox.lambda(w_training),s.window="periodic",robust=TRUE,method="rwdrift", h=length(w_test))
accuracy(rwdrift_test, w_test)
(I got the output from above codes as below but keep having an error msg while knitting it)