I am running R on a networked computer where I don't have write access to most locations on the C drive. However, my IT department decided to load the entire CRAN repository in the default library location on the C drive. I would strongly prefer to manage my packages on my own, and have a location on my networked drive I can install to, but I am trying to get R to ignore and forget the C drive location entirely.
I have tried creating an .Rprofile file to set the library location, but no matter what I do, .libPaths()
does not seem to forget the default location. I have tried the following:
.Library <- file.path("N:/My Documents/R/win-library/3.2")
.Library.site <- file.path("N:/My Documents/R/win-library/3.2")
.lib.loc <- file.path("N:/My Documents/R/win-library/3.2")
.libPaths(.libPaths())
Where the path on the N drive is the new location I want to be the only library path. But when I restart R and run .libPaths()
, I still see this:
[1] "\\\\fileu/users$/username/My Documents/R/win-library/3.2"
[2] "C:/Program Files/R/R-3.2.4/library"
(On a side note, I'm trying to switch from the symbolic '\fileu' reference to a reference to the N drive.)
I know there have been similar questions asked on this in the past (e.g., here), but the particular problem I'm having is that it's not forgetting the C drive location. I can't seem to erase that at all. Any help would be greatly appreciated!