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

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Thu 29 Jul 2004 - 05:59:52 EST


I don't think it is that simple. There are several save formats, some historical that no one wants to touch. So suppose we confined it to the current format. Then one would need a pass over the saved file to see what (e.g. namespaces) should be shared and to find the existing references, so I don't think it would actually save anything much. (If you want to work out if shared can be skipped, the code is in serialize.c ....)

On Wed, 28 Jul 2004, Liaw, Andy wrote:

> 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
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Jul 29 06:07:27 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:55:20 EST