[R] How to save R "clean" sessions in BATCH mode?

mcnda839 at mncn.csic.es mcnda839 at mncn.csic.es
Sat May 16 17:21:08 CEST 2009


Thanks a lot for all of you that have reply me about opening and  
ending R workspaces in BATCH mode. However replies were a king general  
and I’m afraid I could not take the entire message from them.  
Therefore I chose to expose here a representative fraction of my work.

I have 50 Rdata files (F1,F2,F3,F4,
,F50) with objects inside.
I need to:

open F1:
    - perform some simple operations with the objects
    - export the solution with write.table
    - end F1 session
open F2
    repeat procedures as F1


open F50
    repeat procedures as F1



My difficulty here is to end a workspace and open one from the scratch  
to avoid mixing files from consecutive worksessions, and thus using R  
memory unnecessarily. I could use rm() to delete objects from the  
previous sessions but it seems not an efficient task.
Any suggestions on how to perform this in Batch Mode? An examplified  
help would be nice!

Diogo André Alagador
http://www.biochange-lab.eu/people/diogo-alagador
Biodiversity and Global Change Lab, Museo Nacional de Ciencias  
Naturales, CSIC, Madrid, España
Forest Research Centre, Instituto Superior de Agronomia, UTL, Lisboa, Portugal




More information about the R-help mailing list