Hi all, After a short hiatus away from R I have found that it's changed a bit. I used to keep a definition of .First in .Rprofile that did a couple of things on startup (load a couple of libraries). Now, I've discovered that when I change the definition of .First in .Rprofile it doesn't change anything when I start up, because .First is held over in .Rdata from the last session. The manual states that now .Rdata is loaded last, as intended. My question is, how do I change what's in .First (or any other variable, for that matter), if .Rdata will always override my changes? (I'd prefer not to have to do it manually, and I'd prefer to have all the other data preserved, rather than just leaving out .Rdata) Dave R.
What do you have in .First() that you can not have directly in the .Rprofile script? For example: # ~/.Rprofile cat("Running my .Rprofile..."); library(modreg) cat("Running my .Rprofile...done"); Henrik Bengtsson> -----Original Message----- > From: r-help-admin at stat.math.ethz.ch > [mailto:r-help-admin at stat.math.ethz.ch] On Behalf Of David Richmond > Sent: den 6 februari 2003 13:57 > To: r-help at stat.math.ethz.ch > Subject: [R] .Rprofile, .Rfirst, and .Rdata > > > Hi all, > After a short hiatus away from R I have found that it's > changed a bit. > I used to keep a definition of .First in .Rprofile that did a > couple of > things on startup (load a couple of libraries). Now, I've discovered > that when I change the definition of .First in .Rprofile it doesn't > change anything when I start up, because .First is held over > in .Rdata > from the last session. The manual states that now .Rdata is loaded > last, as intended. My question is, how do I change what's in > .First (or > any other variable, for that matter), if .Rdata will always > override my > changes? (I'd prefer not to have to do it manually, and I'd prefer to > have all the other data preserved, rather than just leaving > out .Rdata) > > Dave R. > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > http://www.stat.math.ethz.ch/mailman/listinfo/> r-help > >
.Rdata is the file containing default ( the last one) workspace (at the end of a session if your answer at the qestion "Save workspace?[y/n/c]" is yes a backup of the present WorkSpace is performed overwriting .RData) then you can simply delete it! If you have to perform a backup of your WS use save.image ("path_to_file.Rdata") (something like ../pluto.Rdata). A.S. ---------------------------- |------------------------------------+------------------------------------| |Alessandro Semeria |Tel. +39 544 536811 | |------------------------------------+------------------------------------| |Models and Simulation Laboratory |Fax. +39 544 538663 | |------------------------------------+------------------------------------| |The Environment Research Center - | | |Montecatini (Edison Group), Via | | |Ciro Menotti 48, |E-mail: asemeria at cramont.it | |48023 Marina di Ravenna (RA), Italy | | |------------------------------------+------------------------------------|