SDHS R, Set custom library path for Citrix R (securemints)
Purpose
Below instructions gives you the possibility to configure a custom library path so you can install/load R packages not included in the standard configuration of R in the Secure Citrix Environment (securemints).
How To
You need to create a custom .Renviron file and R-Libs folder in your Home Drive (U) which will be used to install/save all your custom R packages. You will only need to follow the instructions once
- Login to Securemints on https://securemints.medschl.cam.ac.uk with your SDHS account
- Open your Home Drive U
- Navigate to My Documents
- Create R-Libs folder
- We have now created U:\Documents\R-libs path
- Navigate to My Documents
- Open Notepad++ and add
- R_LIBS_USER='U:/Documents/R-libs'
- File -> Save As
- Save in: U: (file should be saved in the root of Home Drive (U)
- Filename: .Renviron
- Save as Type: All files (no text, file should have no extension)
- Restart R Studio
Check if new path is now showing in R Studio (run below command to show the paths).
- .libPaths()
Try to install a package and run it
- install.packages("haven")
Now try to run it
- library(haven)
- it should return >
Logoff / Logon again in SDHS Citrix Environment so we can check the paths and installed libraries are still there.