I recently attended an R training course and was happily working with a laptop in RStudio. On my return to the office I installed RStudio and I tried to run some scripts I had gathered from the course. However, these scripts required me to install packages and when I tried to install the packages the result was an error.

Error in install.packages : path[1]="\file/users/bernard/R/win-library/2.15": Access is denied

In my firm we write to a server drive refferred to as the U: drive rather than the hard disk on the desktop for security reasons. Any ideas what is going on?

I have checked the properties of the folder in windows and it says I have permission but still it fails. I have tried creating a folder on the C drive and directing R_LIBS_USER to it but no luck.


Your best hope would probably be to change your library location:


This way all of your packages will be installed to the network drive.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy