mcnda839 at mncn.csic.es
2009-May-07 14:34 UTC
[R] How to save independent R sessions in BATCH mode???
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 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
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 forPut 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 savein Y_i.rdata. Then you do not need to clean up/load/save all the time anymore. Uwe Ligges> 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 > 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.