On Fri, Nov 13, 2009 at 6:24 PM, Don MacQueen <m...@llnl.gov> wrote: > 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?
On Windows if you start R using Rgui.bat from the command line then it will start in whatever directory you were in (as in UNIX). Rgui.bat is a single file with no dependencies so just copy it to any directory on your path. It will automatically find R using the registry and then start it up. Rgui.bat is found in the batchfiles distribution whose home page is: http://batchfiles.googlecode.com ______________________________________________ R-help@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.