Skip to content
Snippets Groups Projects
Commit 79973c11 authored by Dirk Sarpe's avatar Dirk Sarpe
Browse files

document how to ignore system packages with rstudio

parent 4a29695e
No related branches found
No related tags found
No related merge requests found
...@@ -201,6 +201,33 @@ that we can install the package via the system. ...@@ -201,6 +201,33 @@ that we can install the package via the system.
- https://github.com/eddelbuettel/rcppapt (not yet implemented) - https://github.com/eddelbuettel/rcppapt (not yet implemented)
### ignore system packages
If you do not want to use the system packages for some reason you need to
change the path where R is looking for packages. This must be done at session
startup and is done by defining environment variables. For rstudio to use the
environment variables specify them in a file called `.Renviron`. This file can
either be placed in your home directory or in your working directory. If it is
in a working directory and rstudio did not start with that working directory,
change to it and restart R.
Example:
1. Check your current pathes with `.libPaths()`
1. create directory `~/testsession`
1. create file `.Renviron` in that directory with the content
```
R_LIBS_SITE=/usr/local/lib/R/site-library/
```
1. login to https://rstudio.idiv.de
1. `Session -> Set Working Directory -> Choose Directory` and select the
`~/testsession` directory
1. `Session -> Restart R`
1. Ensure `.libPaths()` contains only the pathes you expect
1. Now install the packages you require.
[R Startup Documentation](https://stat.ethz.ch/R-manual/R-devel/library/base/html/Startup.html)
## Other servers with R ## Other servers with R
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment