I am having the problem that when I use setwd()
with a path that includes spaces (e.g. setwd("C:/Users/Name/My Documents/")
I get the error message
"cannot change working directory"
I am a bit suprised that I did not find much about this here or on google - so it must either be a rare error or everyone knows about it I reckon. Either way, is there a why to work around it?
I am using Windows 7 and R version 3.0.2.
R cannot setwd into a directory that it doesn't have 'x' (execute) permission for.
This should work, but if really needed, you can use the function shortPathName
.
> shortPathName("C:/Program Files (x86)/Adobe/")
[1] "C:\\PROGRA~2\\Adobe\\"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With