I am running R on Windows, not as an administrator. When I install a package, the following command doesn\'t work:
> install.packages(\"zoo\")
Installing
On Ubuntu, the recommended way of changing the default library path for a user, is to set the R_LIBS_USER
variable in the ~/.Renviron
file.
touch ~/.Renviron
echo "R_LIBS_USER=/custom/path/in/absolute/form" >> ~/.Renviron
If you do not have admin-rights, it can also be helpful to open the Rprofile.site
-file located in \R-3.1.0\etc and add:
.First <- function(){
.libPaths("your path here")
}
This evaluates the .libPath()
command directly at start
getwd()
# [1] "C:/Users/..../software/My R studio"
copy the above link with double inverted comma
.libPaths(new="C:/Users/..../software/My R studio")
Your default path will change for installing pakages