An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-help/attachments/20060204/5a920fa5/attachment.pl
Permanent assignments
3 messages · Mikael Anderson, Brian Ripley, Gabor Grothendieck
On Sat, 4 Feb 2006, Mikael Anderson wrote:
I was wondering if it is possible to have permanent assignments in R pretty much in the same sense that S-Plus works.
It is not possible (a consequence of the scoping differences is that R objects are not self-contained). If you want S-PLUS, you know where to get it.
The reason I am asking this is that I was trying to load a FORTRAN subroutine to R and for some reason it didn't work and R crashed and I lost everything which I hadn't saved with save.image() or other similar functions. I tried adding on.exit(save.image()) to .Last() but it seems that if R crashes it doesn't get executed either.
Take a look at the R-devel version of R. That has a signal handler that allows you to save your work when it catches a segfault etc. Or you could ensure that you call save.image() before doing anything error-prone.
I am not saying that this should be the default behaviour in R but I was wondering if one could have this as an option in R as well. /Mikael PS. In case it matters, I run R 2.2.1 under sparc-sun-solaris2.9.
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
You may be able to get checkpoint software that will periodically save the state of the computer, including memory, allowing you to roll back to any point. That would not be R specific. I don't know specifically where to get it but maybe someone else knows of or uses such software.
On 2/4/06, Mikael Anderson <mikael.anderson at gmail.com> wrote:
I was wondering if it is possible to have permanent assignments in R pretty
much in the same sense that S-Plus works.The reason I am asking this is that
I was trying to load a FORTRAN subroutine to R and for some reason it
didn't work and R crashed and I lost everything which I hadn't saved with
save.image() or other similar functions. I tried adding on.exit(save.image())
to .Last() but it seems that if R crashes it doesn't get executed either.
I am not saying that this should be the default behaviour in R but I was
wondering if one could have this as an option in R as well.
/Mikael
PS. In case it matters, I run R 2.2.1 under sparc-sun-solaris2.9.
[[alternative HTML version deleted]]
______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html