I have .libPaths set to have R in the Program files on my C drive, and my R library in Documents/R/win-library, and projects in Documents/R, both on my D drive, which is remapped as my documents directory for all purposes.
However, RStudio’s Tools > Install packages dialog only shows the Program files directory, and does not let me change that directory. This post How to Change the Default Library in Rstudio to a Different Default Library or Custom Library says this is caused by not running RStudio as an administrator.
I am starting R from an admisnistrator account. I have set the properties for both R and RStudio to “run as administrator” in the properties dialog under Shortcut > Advanced, and again under Properties > Security. When running RStudio, I specify Run as administrator in the context menu, and reply “yes” when it asks me if I want to let this program make changes.
And I still see only the program files directory, with no way to change it. What am I missing?
p.s. > Sys.getenv("R_LIBS_USER") shows me the library RStudio will not let me use: