r - How to specify the path in normalizePath, or get around this error associated with it?
You can put in your home directory's .Rprofile
file (just create it if it's not there yet) the following line:
.libPaths("H:/Documents/R/win-library/3.3")
That way this location will be used by default. The .Rprofile
is run every time you're opening any new R session. You can copy the existing content of the folder from which you don't have write access to this folder to include all pre-installed packages.
I think you are looking for:
system("net use D: \\\\company\\path\\")
to map to the virtual D
drive. I would then use file.path
when accessing the stuff on D:
. It looks that you may benefit from changing R defalut library path in Rprofile.site
, by adding the line:
.libPaths("Path to your libs")
When you type .libPaths()
can you read and write to that directory with no problems?