- #How to change location of maschine library install
- #How to change location of maschine library windows
In this case, setting the default working directory to the directory that houses your Rprofile will be sufficient. The Rprofile solution can work if RStudio is always started by clicking the RStudio shortcut. libPaths() regardless of starting RStudio directly or by right-clicking an file and "Open With" to start RStudio. Setting R_LIBS_USER will ensure that the library shows up first in.
#How to change location of maschine library windows
If for some reason you do not have access to the control panel, you can try running rundll32 sysdm.cpl,EditEnvironmentVariables from the command line on Windows and add the environment variable from there. To set environment variable R_LIBS_USER in Windows, go to the Control Panel (System Properties -> Advanced system properties -> Environment Variables -> User Variables) to a desired value (the path to your library folder), e.g. The proper solution is to set environment variable R_LIBS_USER to the value of the file path to your desired library folder as opposed to getting RStudio to recognize a Rprofile.site file. "C:/software/Rpackages" "C:/Program Files/R/R-2.15.2/library" libPaths() command seems to work as it is supposed to.
#How to change location of maschine library install
libPaths command that I added to the Rprofile.site doesn't seem to have had any effect! Why is this the case? Or more importantly, how can I fix the problem so that I can install and load packages without typing in the library location? "C:/Program Files/R/R-2.15.2/library" "C:/Program Files/RStudio/R/library" However, after doing this, and starting RStudio, this is the output that I get >. To load a package, I also have to specify the library location: library("zoo", lib.loc="C:/software/Rpackages")Īll of this is OK, but I wanted to see if I could add C:/software/Rpackages to the library path somehow and thus not have to type it each time.Īs I searched online, I found that one way to do this is to edit the Rprofile.site file and to add the line. To install a package, I have to specify a library location: install.packages("zoo", lib="C:/software/Rpackages") 'lib = "C:/Program Files/R/R-2.15.2/library"' is not writable Installing package(s) into ‘C:/Program Files/R/R-2.15.2/library’ When I install a package, the following command doesn't work: > install.packages("zoo") I am running R on Windows, not as an administrator.