Linux package installation path of change R
background
different server nodes installed linux R library package installed by default in their path R, each node has a similar installation path, between the different packet node R can not be shared.
problem
R how different nodes share a common package, eliminating the need to repeat the installation package R pain.
method
In addition to increasing environmental variables method, but if you want to set their own path to long-term use, first set a common shared path several nodes in their own directory, create .Rprofile file and add the following in the file:
.libPaths("/yourpath/R/library")
###多个路径使用c()相连
.libPaths(c("/yourpath/R/library","yourpath2/Rlibrary"))
Of course, if one only want to change the path, the above command to the R input terminal.