R function seas() not found in v.4.1.0

Solution for R function seas() not found in v.4.1.0
is Given Below:

I have a script that I have used several times over the past year. The last time I used it was 3 months ago. It was all working with no errors.

In the interim, I have upgraded R to v. 4.1.0. This may be a generic problem, but I’ve covered what I think are the obvious possible explanations (packages not installed, libs not loaded, typos, etc).

Here’s the relevant code (all calls are successful up to the seas() call):

library(seas) # Added recently in attempt to mitigate this issue


LT <- read.csv("C:\...\lt.csv")

LTts <- ts(LT, start=c(2007,1),frequency=12)


LTx11 <- seas(LTts, x11="")

RESULT (Console output):

> LTx11 <- seas(LTts, x11="")
#Error in seas(LTts, x11 = "") : could not find function "seas"

Any tips or suggestions would be greatly appreciated.

After digging around a little more, I found the original text reference where I had learned to use the seas() function in Hyndman’s text: https://otexts.com/fpp2/x11.html

In that text, I also found that seas() should be exposed by the seasonal library and verified this in the docs for that library.

After verifying this, added seasonal:: in front of the function and it worked. I wish I knew WHY this happened, but I don’t. So here is the workaround.


LTx11 <- seasonal::seas(LTts, x11="")

If anyone can explain why this was necessary in v.4.1.0 and not earlier versions of R, please do!