General problem installing any R package

When trying to install any R package on your system, for example:



you get an error like the following:

The downloaded source packages are in
Updating HTML index of packages in '.Library'
Warning in install.packages :
cannot create file
'/opt/POC/lib64/Revo-7.3/R-3.1.1/lib64/R/doc/html/packages.html', reason
'Permission denied'
This error will occur when you do not have the necessary file permissions to be able to write to the current R library folder as the user 

you are currently logged in as.   You can use the R function '.libPaths()' to both query and change the current location R will use to install new user-contributed libraries.

For example:



To change the default location in which to add R user contributed libraries permanently, you can add this to your user-specific  .'Rprofile' file or to the system-wide ''  in '/usr/lib64/Revo-7.3/R-3.1.1/lib64/R/etc', if you need to change this setting for all of your R users.
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Article ID: 3103821 - Last Review: 11/01/2015 14:24:00 - Revision: 1.0

Revolution Analytics

  • KB3103821