Creating a personal library for R packages - Windoze 10.
- Create a directory called Rlibs. [The name is not that important but must match the name in the enironment variable later.
Try to avoid network drives as this often results in performance issues if access to the network is slow.
Here I created my personal packages directory C:\Rlibs.
Other popular locations are under your Documents directory.
- Use the File Explorer to select Properties for your machine.
- Select Advanced System setting
- Select the Advanced tab; Select the Environment Variables option.
- Create a New Environment variable.
- Enter R_LIBS as the variable name. This MUST BE SPELLED EXACTLY as shown.
Enter the location of your personal directory (from step 1).
- Press OK until all the dialogues are complete.
- Check that everything is working by launching Rstudio
Type the following command in the console. You should see the new paths for your personal (package)
library:
Your personal library should be listed first.
[
SFU Statistics and Actuarial Science Home
|
SFU Home]
Email comments or suggestions to Carl Schwarz (cschwarz@stat.sfu.ca)
© 2018 Carl James Schwarz Last updated 2018-10-15.