ARCHIVED: Install R packages on the Karst RStudio server

This content has been archived, and is no longer maintained by Indiana University. Resources linked from this page may no longer be available or reliable.

UITS retired the RStudio web interface on June 30, 2018. UITS recommends accessing RStudio via the menu bar in Research Desktop (RED) Beta. For more about RED Beta, including how to get access, see Research Desktop (RED) at IU.

At Indiana University, UITS operates a web-accessible instance of RStudio Server on the Karst research computing cluster. Users can install R packages in their Karst home directories.

The following example creates a directory called r-packages and writes a line in the file .Renviron. This file stores the system variable R_LIBS_USER.

system("mkdir ~/r-packages")

fileName <- file(".Renviron")
x="R_LIBS_USER = \"~/r-packages\""
writeLines(x, fileName)

After creating the .Renviron file, you can install packages from the CRAN repository with the install.packages command:


This is document apho in the Knowledge Base.
Last modified on 2018-07-24 13:25:16.

Contact us

For help or to comment, email the UITS Support Center.