kim kevin kim kevin - 3 years ago 176
R Question

run R as administrator

I was using my own laptop to install R and I found that it only has one library. Evne though this library is still

read only
, everytime when I use Rstudio:
, I can see that the new packages are stored automatically into that
read only
library folder.

In my office's desktop, I "believe" I also have administrator role, as I can install and remove anything (by far). I download the latest version of R and I right click the
, there is an item "run as administrator", then it is installed in my desktop. However, when I use R studio to install new packages as in my laptop, it always automatically create a personal folder to store the new packages. I don't know why. Is that a way to only have one folder for library? I also tried on the desktop in the plain R mode (without using Rstudio). When I want to install new packages, it always says

Warning in install.packages("devtools") :
'lib = "C:/Program Files/R/R-3.4.1/library"' is not writable

And there is a window pops up to ask me "would you like to create a personal folder?" And if I say no, then

Error in install.packages("devtools") : unable to install packages.

Is there a ways to solve this problem? To just maintain one folder for library

Jay Jay
Answer Source

What version of Windows are you using? You should be able to right-click on the Rstudio.exe icon, click Properties, and select an option to always run Rstudio as administrator. Be sure you use that same icon whenever you want to open Rstudio.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download