I'm learning R and just have it installed on my office computer. I don't have the administrator right on the computer (as I even have to call IT for installation).
Then I install a package. At first it doesn't work when typing, for example:
install.packages("thepackage")
The error message is this:
Error in normalizePath(path.expand(path), winslash, mustWork) :
path[1]="\\company\5050\Users\myusername\Documents\R\win-library\3.3": Access is denied
In addition: Warning message:
In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="\\company/5050/Users/myusername/Documents/R/win-library/3.3": Access is denied
I do some homework and find that a potential solution is to "Map a network drive to your network folder". I'm not sure what it means, but I try this:
install.packages("thepackage",lib="H:/Documents/R/win-library/3.3")
because it looks like I have more "control" of H drive (it has my username on it). And it works:
package ‘thepackage’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\myusername\AppData\Local\Temp\Rtmp4MNURu\downloaded_packages
I then fail to load the package,
library(thepackage)
saying:
Error in normalizePath(path.expand(path), winslash, mustWork) :
path[1]="\\company/5050/Users/myusername/Documents/R/win-library/3.3": Access is denied
But again this works:
library(thepackage,lib="H:/Documents/R/win-library/3.3")
So how can I set the normalizePath to the one that works to avoid additional and rather unnecessary specification of library directory?