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.

Problem

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

install.packages("proto")

 

you get an error like the following:

The downloaded source packages are in
?/tmp/Rtmph4YKLX/downloaded_packages?
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'

Solution

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:

>.libPaths("/home/testuser/Rlib")

 

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 '.Rprofile.site'  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.

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!

×