[R] How to save independent R sessions in BATCH mode???
ligges at statistik.tu-dortmund.de
Fri May 8 18:25:31 CEST 2009
mcnda839 at mncn.csic.es wrote:
> Hi guys,
> I already have put this question some time ago however replies were not
> straight to the problem. Even so thanks a lot for the answers!
> I reformulate the problem.
> I have a script file with the following commands:
> for (i in 1:300)
> - open session --> load(“X_i.rdata”)
> - perform some calcules --> (…)
> - save session --> save.image(“Y_i.rdata”)
> end for
Put it into a function. That function accepts the objects you have had
in X_i.rdata as arguments and that returns the objects you are gping to
Then you do not need to clean up/load/save all the time anymore.
> The problem here is that, I cannot save.image and begin a new “clean”
> session. An hypothesis could be to delete all R objects after the
> save.image, but this does not seem too efficient to perform.
> What should I do to begin a R clean session in the same batch
> processing? Are there any other suggestion on this?
> Thanks in advance,
> Diogo André Alagador
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help