r - How to specify the path in normalizePath, or get around this error associated with it? -
i'm learning r , have installed on office computer. don't have administrator right on computer (as have call installation).
then install package. @ first doesn't work when typing, example:
install.packages("thepackage") the error message this:
error in normalizepath(path.expand(path), winslash, mustwork) : path[1]="\\company\5050\users\myusername\documents\r\win-library\3.3": access 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 denied i homework , find potential solution "map network drive network folder". i'm not sure means, try this:
install.packages("thepackage",lib="h:/documents/r/win-library/3.3") because looks have more "control" of h drive (it has username on it). , works:
package ‘thepackage’ unpacked , md5 sums checked downloaded binary packages in c:\users\myusername\appdata\local\temp\rtmp4mnuru\downloaded_packages i fail load 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 denied but again works:
library(thepackage,lib="h:/documents/r/win-library/3.3") so how can set normalizepath 1 works avoid additional , rather unnecessary specification of library directory?
you can put in home directory's .rprofile file (just create if it's not there yet) following line:
.libpaths("h:/documents/r/win-library/3.3") that way location used default. .rprofile run every time you're opening new r session. can copy existing content of folder don't have write access folder include pre-installed packages.
Comments
Post a Comment