I'm working with the devtools package in R, and I'm trying to use it to install a GitHub repo for my class. However, I have a path with spaces in it, and here is the error message I'm getting:
Installing package into ‘C:/Users/Kaelan McGurk/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
* installing *source* package 'buildings' ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Fatal error: cannot open file 'C:\Users\Kaelan': No such file or directory
But here is the output of Sys.getenv("PATH")
:
C:\\Program Files\\R\\R-3.6.0\\bin\\x64;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Windows\\System32;C:\\Windows;C:\\Windows\\System32\\wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\PharosSystems\\Core;C:\\Program Files (x86)\\Skype\\Phone\\;C:\\Program Files\\PuTTY\\;C:\\Program Files (x86)\\Wolfram Research\\WolframScript\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Program Files\\MySQL\\MySQL Shell 8.0\\bin\\;C:\\Users\\Kaelan McGurk\\Documents\\MATH335\\M335_WI20_McGurk_Kael\\%USERPROFILE%\\AppData\\Local\\Microsoft\\WindowsApps
So I'm not sure what's going on here,
How can I avoid the fatal error "cannot open file"
Honestly, because your Windows configuration probably doesn't allow for it, I wouldn't suggest doing the above answer. IF YOU CAN, I would suggest making a local Windows user admin account called like "kaelanr" or something like that, and then copy all of your R files over to there, instead of trying to fight with changing names and stuff like that.