If you haven't deployed the Rstudio server yet, look here:
http://blog.fens.me/r-rstudio-server/
After assigning a good user, and setting up a group,
You can use. Libpaths () to see the library path
.libPaths()[1"/home/xxx/R/x86_64-pc-linux-gnu-library/3.0""/usr/local/lib/R/site-library" [3"/usr/lib/R/site-library" "/usr/lib/R/library"
Where the "/usr/lib/r/site-library" path is where all users share the library, so you want to share a library as long as the package is installed in this directory.
However, the group permissions for the/usr/local/lib/r/site-library path are "staff" by default, so you will have permission to install to this directory.
Modify the Site-library group to the MyGroup group so that members of the MyGroup can install the package into the Site-library directory.
sudo chgrp mygroup /usr/local/lib/R/site-library
To install a shared package for everyone in the R language:
install.packages("ggplot2","/usr/local/lib/R/site-library")
Rstudio server lets users share a library