[R] moving R objects

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Aug 26 12:31:39 CEST 1999


> From: "KAREN KOTSCHY" <karen at gecko.biol.wits.ac.za>
> Date: Thu, 26 Aug 1999 11:22:23 GMT+2
> 
> Another question:
> 
> Is it possible to move R objects from one directory to another 
> without copying the whole .RData and .Rhistory files?
> (I'm running under Linux)

As I understand it you want to make an object stored in one workspace
(.RData) available to another session.  Ideas

1) You don't need to copy: you can just

load("/another/dir/.RData")

which will add all the objects in the other .RData.

2) Fire up R in the first directory, and save the objects you want by

save(obj1, obj2, ..., "myobjs.rda")

then fire up R in the destination and use

load("/another/dir/myobjs.rda")

You can even make this .RData not myobjs.rda if you don't have
one already.


-- 
Brian D. Ripley,                  ripley at 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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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