[R] Batch files in R

Adaikalavan Ramasamy gisar at nus.edu.sg
Thu Jul 3 05:32:21 CEST 2003

You can use save(object1, file="lalala.1"), save(object1,
file="lalala.2"), ... and the use load() to restore the object1 and
object2. Or if you have many objects in a simulation to save, you can
save all objects using save.image("sim1.result.R").

Another option is to use write.table or zz <- file("lalal1.txt"); cat(
... , file=zz) etc if you want a human-readable form of your output.

It would be a good idea to use the compress=TRUE option in save() and R

-----Original Message-----
From: Johanna Hardin [mailto:Jo.Hardin at pomona.edu] 
Sent: Thursday, July 03, 2003 2:24 AM
To: 'r-help at lists.R-project.org'
Subject: [R] Batch files in R

When I submit more than one batch file (same programs, different
parameter values, huge simulations, different result names) the only
results that get saved are from the *last* batch file to finish.  They
are all being run in the same subdirectory (so same .RData file?)

I've done:

R --save BATCH infile outfile

and I've also put


at the end of the program, but it will still only save results from one
program.  Is there any way to get all the results to save without
putting each of the batch files in a separate directory?

Thanks, Jo

Johanna Hardin
Department of Mathematics & Computer Science
Pomona College
(909) 607-8717
jo.hardin at pomona.edu

	[[alternative HTML version deleted]]

R-help at stat.math.ethz.ch mailing list

More information about the R-help mailing list