Sometimes Asked Questions

From Wiki1

Jump to: navigation, search

How to connect to WebFAS


Installing R packages on a server

Question: When I use server X, I can't install packages because I don't have the right permissions. What can I do?

Answer: If the R home directory is write protected, an easy work around for installing additional packages is to have the student run the install with the "lib" argument which specifies an already created directory that they have write privileges for:

install.packages("ggplot2", lib="/data/Rpackages/")

Then, to load the package use the lib.loc argument:

library(ggplot2, lib.loc="/data/Rpackages/")


  • I believe this will work with full paths (e.g. "F:/data/RPackages" - allowing students to specify their user drives)
  • If this is going to be used often, a student can create an .Renviron file and place it in the R home directory to automatically add that library path during the R start-up. The file should contain:
R_LIBS = /data/Rpackages/
  • However, for the above to work, the .Renviron file needs to be placed in the R home directory, which students may or may not have access to.
Personal tools