Got the following error while trying to load up the library forecast

Error: package or namespace load failed for ‘forecast’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘lmtest’

... cannot open URL ''
Warning in install.packages :
download of package ‘lmtest’ failed

1 Like

Did you try installing lmtest?

I did. But there is an error in downloading it.

Sorry; I missed that in your original post.

I was able to download lmtest just now:

> install.packages("lmtest")
Installing package into '/Users/kevin/Library/R/3.4/library'
(as 'lib' is unspecified)
trying URL ''
Content type 'application/x-gzip' length 277347 bytes (270 KB)
downloaded 270 KB

And the CRAN webpage suggests that package was just updated:

So you might need to restart R and just try installation again once more.