Andrew J. Rominger
2008-Nov-21 03:43 UTC
[R] 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
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 %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Apparently Analagous Threads
- is there a formatted output in R?
- pretended size postscript and size of the graphic device window
- OT: Software for specific visualisation of data...ideas?
- Error in plot.envfit(ef, p.max = 0.1) : (subscript) logical subscript too long
- one problem about how to hold graphic with R