I would like to set up a user library in Windows. In Linux, RStudio shows the User Library and the System Library in the Packages pane. However, I was not able to obtain the same in Windows.
This is what I have done:
- First I created the default folder for the user library with:
dir.create(Sys.getenv("R_LIBS_USER"), recursive = TRUE)
- Restarted R
After that, if I run
.libPats(), the first path is the one of the user library and if I install a package it goes in the right folder.
However, RStudio doesn't show User Library in the Packages pane and the new installed package appears in the System Library.
Is there a way to fix this? I've google the problem but I didn't find any solution that worked.
I have R 4.2.1 and RStudio 2022.07.1