Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

When I attempt to install a package - forecast, I get the following error

utils:::menuInstallPkgs() 
trying URL http://cran.revolutionanalytics.com/bin/windows/contrib/3.0/forecast_5.4.zip
Content type 'application/zip' length 1194249 bytes (1.1 Mb) 
opened URL 
downloaded 1.1 Mb

package ‘forecast’ successfully unpacked and MD5 sums checked 
Warning: cannot remove prior installation of package ‘forecast’

library(forecast) 
Error in library(forecast) : there is no package called ‘forecast’

There are instances of this happening to not only the forecast package.  It appears to happen when the previous version does not get removed because to file is in use or the archive is corrupt.  The correction is not difficult.

In RRE, type 

.libPaths() and press enter

This should give you the directory(ies) the libraries are stored. Navigate to the location and delete the forecast folder and it's contents.

You will need to close RRE before you can delete the folder.

Then restart RRE, and type 
install.packages('forecast') and press enter

Once complete, type 
library(forecast)

This will re install the latest version of the package or clean up the archive if corrupt.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×