[R] .Rprofile on MacOSX
Andrew C. Ward
s195404 at student.uq.edu.au
Fri Jul 12 22:33:06 CEST 2002
Hi Jackie,
What you've done so far is fine. In Windows there are several ways to do what you want.
A Mac user may be able to give you more specific information. I apologise in advance
if some of this doesn't apply to the Mac.
1. You can use the GUI interface to change the working directory, and then load .Rdata
and .Rhistory files.
2. You can also nominate the directory that the R shortcut starts in. You could have a
separate shortcut for each project you're working in. I believe this is quite common
among R users.
Note that the environment variable R_USER indicates, among other things, the location of your
.rprofile file rather than a start-up directory.
Please let us know how you go and if you need any more help.
Regards,
Andrew C. Ward
CAPE Centre
Department of Chemical Engineering
The University of Queensland
Brisbane Qld 4072 Australia
andreww at cheque.uq.edu.au
-----Original Message-----
From: Jackie Chappell [SMTP:jackie.chappell at zoo.ox.ac.uk]
Sent: Friday, 12 July 2002 5:58 PM
To: R-Help
Subject: [R] .Rprofile on MacOSX
I'm new to R, so apologies if the answer to my question is very obvious to
everyone else!
I use the carbon version of R (1.5.1), not the Darwin version. After a bit
of a battle, I'm getting to grips with using R, and really getting to like
it, but I'm still having trouble customising startup the way I'd like it.
Reading ?Startup, I see that I can specify some commands to be run when R
starts in .Rprofile. What I'd like to do is set up some project specific
directories in my home directory (for example ~/Rprojects/crows). I would
then start R, change the working directory to the chosen project folder,
then have an .Rprofile load the history and workspace specific to that
folder. I would also like to automatically save the history and workspace
when I quit, which I gather from the docs I could do with suitable commands
in .Last placed in .Rprofile. All well and good, but I don't seem to be able
to get R to pay any attention to what is in .Rprofile!
In the help entry, it says that you can have an .Rprofile in R_Home/etc/
(which doesn't exist in my installation, but didn't work when I made an /etc
subdirectory), or in ~/ which also didn't work. R starts up in
/Applications/rm151/, and I can't seem to change this. When I set R_HOME to
another directory in .Renviron, Sys.getenv() tells me that R_HOME is set as
I requested, but R still starts up in /Applications/rm151 (I think I must
have misunderstood what R_HOME does).
Any help would be much appreciated!
Jackie
--
Dr. Jackie Chappell
Department of Zoology, South Parks Road, Oxford OX1 3PS
E-mail: jackie.chappell at zoo.ox.ac.uk, http://users.ox.ac.uk/~kgroup
Tel: +44 (0)1865 271245, Fax: +44 (0)7092 309 843
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list