Skip to content
Prev 162667 / 398500 Next

different .Rprofile files for different projects

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.

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