I have read the R FAQS and other posts but I am a bit confused and would be grateful to know whether I did everything correctly.
In Windows, in order to modify the default library folder I created a file Renviron.site
and put inside E:/Programs/R-3.3.0/etc
.
The file has only one line saying
R_LIBS=E:/Rlibrary
When I open R and run .libPaths()
I see E:/Rlibrary
as [1] and the default R library E:/Programs/R-3.3.0/library
as [2].
This should mean that from now on all packages I will install will go in E:/Rlibrary
but at the same time I will be able to load and use both packages in this folder and those in the default location. Am I correct?
install.package
has alib
parameter which you can use to specify which folder to install to.