[R] save() in the presence of conflicts

David Brahm a215020 at agate.fmr.com
Fri Sep 28 23:09:46 CEST 2001

In the function g.save.data() I posted a few hours ago, I save() objects that
live in position 2.  However, if there are objects of the same name in
position 1, save() sees them instead.  How can I tell save() that I want the
objects in position 2, i.e. something like:
  save(get("x",2), myfile)
  save(list="x", myfile, pos=2)

Right now my crude solution is:
  for (i in obj) if (exists(i,1,inherits=F)) rm(list=i, pos=1)

	    -- Thanks,  David Brahm (a215020 at agate.fmr.com)
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list