[R] How to add an object to an RData file ?

Liaw, Andy andy_liaw at merck.com
Wed Jul 28 20:27:20 CEST 2004


I guess it would be nice if save() has an `append' option...

Andy

> From: Roger D. Peng
> 
> I can't think of a faster way.
> 
> -roger
> 
> Ernesto Jardim wrote:
> > Hi,
> > 
> > I've saved an RData file with "save" and now I want to add 
> a new object
> > to this file. At the moment I do:
> > 
> > attach("file.RData")
> > save(list=c("new,obj", ls(pos=2)), file="file.RData", compress=T)
> > detach()
> > 
> > Is there a quicker method that just add the object to the file ?
> > 
> > Thanks
> > 
> > EJ




More information about the R-help mailing list