Setup information for using R on a node computer.
The first thing to do before opening RStudio on node is to set your R package library to the shared package library on the G Drive. You will only have to do this once, as the environment variable should be remembered on your user account even if you are using a different node computer. Previously, I recommended you do this by setting the environment variable with a line of R code. This does not appear to have a high enough level of permissions to make sure the change is consistent across node computers, so instead I have laid out steps below to do this through the Windows Control Panel.
The easiest way to access the environment variables settings is to open up Control Panel (within your Start menu), and then search for the settings using the keyword ‘environment’. You will want to click on ‘edit the environment variables’ link to open the dialog, as shown in the screenshot below.
Click the ‘New’ button to create a new environment variable. Type in R_LIBS_USER
for the variable name and G:/Resources/r_package_library
for the variable value. Press OK.
Confirm your new variable is reflected in the list of user environment variables as below. Press OK to confirm.
You can verify that this environment variable is set to the correct value you set above anytime by running the following line of code:
Sys.getenv(x = 'R_LIBS_USER')
It should return the path you just set above ('G:/Resources/r_package_library'
) . If it does not for some reason, please contact Bryan Blanc to make him aware of the issue, and he will work with IT to help you resolve the issue.