[R] run setwd at the launch of R

Mark Wardle mark at wardle.org
Sun Jan 6 14:33:27 CET 2008


It may be disgusting, but I'm not how you expect R to know where to startup.

On my Mac, I keep all my scripts in a per-project working directory.

I therefore type

cd ~/Documents/ataxia

If you have multiple nested directories then why not create a
directory alias (soft-link) so it is easy to "cd" to? Or move the
relevant folders to a better place?

Alternatively, use the Mac OS X GUI, which has an option in
preferences about "initial working directory".

Mark

On 06/01/2008, bunny , lautloscrew.com <bunny at lautloscrew.com> wrote:
> Dear all,
>
> my R files (and the .csv files as well) are saved somewhere pretty
> deep down my hard disk.
> i have to chage to working directory therefore everytime i run R (i
> run it on powerPC mac), which is disgusting.
> using the setwd command at the beginning of an R script doesnt really
> help because i have to find this file first by hand.
>
> I am looking for possibility to run setwd during the launch process
> of R are straight after it ... any suggestions ?
>
> i would be very glad about good ideas or help !
>
> thanks in advance
>
> matthias
>
> ______________________________________________
> 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.
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>


-- 
Dr. Mark Wardle
Specialist registrar, Neurology
Cardiff, UK




More information about the R-help mailing list