Re: [R] different .Rprofile files for different projects

From: Gavin Simpson <gavin.simpson_at_ucl.ac.uk>
Date: Sat, 22 Nov 2008 15:33:01 +0000

On Thu, 2008-11-20 at 19:43 -0800, Andrew J. Rominger wrote:
> Dear list,
>
> First off, let me offer my apologies, I know this is a very basic
> question. After amassing a large number of objects (from multiple
> projects) in one working directory, I'd like to be able to start using
> different directories, just for the sake of organization alone. But I
> have no idea how to do this. I am using a mac, running R 2.5.

I'm not very familiar with the MacOS X version of R, but students of mine were using it recently and under the Misc menu there is an entry to change the working directory, which provides a standard Mac directory selection dialogue box IIRC.

Alternatively, start R as per usual and then change into the correct directory using the setwd() function.

You should probably update your R - 2.5.0 is 18 months old now, 2.8.0 is current.

G

>
> Searching the FAQ online I find:
>
> 12.1 How can I have a per session .Rprofile?
> You can by writing a .Rprofile file in your favorite session
> directory...
>
> So I think my specific question is how do I write a .Rprofile? I know
> it should be obvious, but is there a command to be called in the R
> console during a given session, or do I write a stub file outside of R
> (in a session directory?), open this using Preferences and then modify
> it in an R session? If the latter, how do I go about writing a stub
> and making R recognize it as a working directory, and what is a
> session directory/how can I find where the default session directory
> is located?
>
> Again, my apologies for being naive, and thanks very much for any
> help--
> Andy Rominger
>
> ______________________________________________
> 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.

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

______________________________________________
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.
Received on Sat 22 Nov 2008 - 15:35:47 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 22 Nov 2008 - 16:30:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive