[R] Difficulties with setting working directory

Roebuck,Paul L proebuck at mdanderson.org
Tue Oct 18 19:07:03 CEST 2016


On 10/14/16, 1:52 PM, "R-help on behalf of Anže Dejak" wrote:

>So, the thing with my version of R (I'm using RStudio for R x64 3.3.0 in,
>currently, Windows 7) is, that I'm able to set the working directory
>temporary (through using setwd() function), but once I try to set it
>permanently (through "Session -> Set Working Directory -> Choose
>Directory..."), this error appears: Error in setwd("~/...") : cannot
>change
>working directory.
>
>As I've seen online on certain forums, the problem, supposedly, is that R
>in Windows is unable to recognize the ~ sign. But without it, I'm unable
>to
>set the working directory for more than a session.
>
>I'd hope you have a possible answer to this error.

Two problems:

1) R won't convert "~" to its shell equivalent without using path.expand()
2) There is no "..." directory [only "." (current) or ".." (parent)]

The information contained in this e-mail message may be privileged, confidential, and/or protected from disclosure. This e-mail message may contain protected health information (PHI); dissemination of PHI should comply with applicable federal and state laws. If you are not the intended recipient, or an authorized representative of the intended recipient, any further review, disclosure, use, dissemination, distribution, or copying of this message or any attachment (or the information contained therein) is strictly prohibited. If you think that you have received this e-mail message in error, please notify the sender by return e-mail and delete all references to it and its contents from your systems.



More information about the R-help mailing list