How to install R packages in different locations?#
The default location for R packages is not writable and you can not install new packages. On demand we install new packages system-wide and for all users. However, it possible to install packages in different locations than root and here are the steps:
create a directory in
echo 'export R_LIBS_USER=~/R/libs' >> ~/.profile
You need to restart your jupyter server to activate the changes.
You can check if the new libs Path is loaded:
The ouput should contain the new path:
We can also install new packages system-wide for all users. Therefore, we need a link to the package.