[R] "cannot change working directory"

R. Michael Weylandt michael.weylandt at gmail.com
Wed Mar 21 17:27:45 CET 2012


Scratch that -- while true, it doesn't seem to cause that error message.

Can you do this?

list.dirs("/Users/user/Desktop/Recorded results/")

Also, are you sure you have various access permissions to the Wednesday folder?

Michael

On Wed, Mar 21, 2012 at 12:25 PM, R. Michael Weylandt
<michael.weylandt at gmail.com> wrote:
> If you are on a mac, you don't need to escape spaces within setwd():
> e.g., on my machine,  setwd("~/Desktop/Current Semester") works just
> fine.
>
> Michael
>
> On Wed, Mar 21, 2012 at 12:08 PM, mela <dashmisafta at gmail.com> wrote:
>> Hi,
>>
>> I need to write  program to run some results from an experiment. i have the
>> results saved in 2 different files, named "tuesday" and "wednesday" (both
>> located within the same file). when i wrote the program for "tuesday" i had
>> no problem running it, but when i changed the work directory to wednesday i
>> got the "cannot change working directory" message. I don't understand what's
>> different between the two.
>>
>> my first code was:
>>
>> setwd("/Users/user/Desktop/Recorded\ results/tuesday")
>>
>> and my second code is:
>>
>> setwd("/Users/user/Desktop/Recorded\ results/wednesday")
>>
>> and i copied the exact location from the terminal, so i can't have typos (i
>> am using a mac, if that makes any difference).
>>
>> any suggestions? i will be grateful for any insight.
>>
>> thanks
>>
>> mela
>>
>>
>> --
>> View this message in context: http://r.789695.n4.nabble.com/cannot-change-working-directory-tp4492812p4492812.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list