cannot execute hts package in a specific pc

Hi everyone, I just instaled the hts package and tried to execute the following code

data <- window(htseg2, start = 1992, end = 2002)
test <- window(htseg2, start = 2003)
fcasts <- forecast(data, h = 5, method = "bu")
accuracy(fcasts, test)
accuracy(fcasts, test, levels = 1)

The problem is that R and also R Studio suddenly stop working when running the third line of code.

My R version is R version 4.1.1 and R Studio is 2021.09.0 Build 351.

Surprisingly I execute the code on another computer with a slightly older version and it runs Ok. I already uninstalled the R and R Studio versions and it did not work.

Any help will be appreciated.


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.