[R] Change working directory

Don MacQueen macq at llnl.gov
Sat Nov 14 00:24:38 CET 2009


In R for Macintosh, there is a Preferences setting that will do this.
You can also drag and drop a file onto the R icon and I believe it 
will change the working directory to the directory that contains the 
file.

On unix-like systems, using the command line, it's whatever directory 
you start R in.

I don't use R on Windows, so I don't know there, but I imagine there 
may be a preferences setting, or perhaps the drag and drop method 
works. Or maybe create a shortcut in the directory you want to be the 
working directory?

-Don


At 6:34 AM -0800 11/13/09, anna_l wrote:
>Hello, I am using setwd() to change the working directory but I have to enter
>it everytime I open R, is there a way to set this permanently as a working
>directory? Thanx =^D
>
>--
>View this message in context: 
>http://*old.nabble.com/Change-working-directory-tp26337486p26337486.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.


-- 
--------------------------------------
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
925-423-1062




More information about the R-help mailing list