[R] set working directory in Windows XP

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Dec 4 17:03:22 CET 2009


You set this on the properties of the shortcut you use to start R, 
just like any other Windows application.

R's working directory is always initially the directory it is started 
from.

This *is* in the FAQ:

http://cran.r-project.org/bin/windows/base/rw-FAQ.html#How-do-I-run-it_003f

even though we do not pretend to give a Windows tutorial.

On Fri, 4 Dec 2009, Ivan Calandra wrote:

> Hello everybody,
>
> I'm new in the R world and I'm struggling to set the working directory.
> Up to now, I just set it up every time I start R ( 'setwd()' ) but I'd like 
> it to be set automatically. I've read the FAQ as well as the help on Startup 
> ('?Startup') about the environment variables and profiles but I could not 
> understand what to do: which command line, which variable, which file etc.
>
> I hope you'll be able to help me.
> Thanks a lot in advance,
> Ivan
>
> ______________________________________________
> 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.
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list