Somehow, my home and library directories in R got changed to a cloud location, which is messing up a bunch of paths, and now, I can't seem to change it back. When I type path.expand("~")
in R, I get back "C:/Users/MyName/OneDrive/Documents"
, but I was expecting to get "C:/Users/MyName/Documents"
.
When I try .libPaths()
, I get "C:/Users/MyName/OneDrive/Documents/R/win-library/3.4"
and "C:/Program Files/R/R-3.4.3/library"
, but I only want the latter.
I have tried uninstalling and reinstalling both R and RStudio (thus now working with the most-recent versions of each), but the cloud path persists. I have seen posts elsewhere on SO about setting things in the .Rprofile file, but I don't think that's the right option, especially since the .Rprofile file would then have to be in a cloud location, which I don't want.
I have looked at my environment variables in the control panel (I'm on Windows 10) and looked at PATH, but there's nothing there that specifies the cloud directory, so I don't know where it's coming from.
How do I permanently change my home directory and also make sure that .libPaths
is pointing to only the actual library directory?