Directory of R packages

Hi,

I do not know that how it happened, but R started to install packages into a folder which exist in microsoft onedrive. I already reinstalled R and RStudio, but it couldnt solve the issue, that packages will be downloaded into that folder. Is there a way to solve this?

image

You can change the default folder by setting your R_LIBS_SITE environmental variable in a .Reviron or .Rprofile file

# In .Renviron file you can set it by adding this line
R_LIBS_SITE="C:\\Program Files\\R\\R-4.0.3\\library"

For a more detailed explanation, you can read this blog post

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.