Install R packages on the Karst RStudio server

Note:

UITS will retire 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 Beta 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")
setwd("~/r-packages")

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

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

install.packages("my_r_pkg")

This is document apho in the Knowledge Base.
Last modified on 2018-05-04 16:57:44.

  • Fill out this form to submit your issue to the UITS Support Center.
  • Please note that you must be affiliated with Indiana University to receive support.
  • All fields are required.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.

  • Fill out this form to submit your comment to the IU Knowledge Base.
  • If you are affiliated with Indiana University and need help with a computing problem, please use the I need help with a computing problem section above, or contact your campus Support Center.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.