[R] copying objects

Liaw, Andy andy_liaw at merck.com
Fri Aug 2 13:59:02 CEST 2002


1. Load the first workspace image (e.g., start up R in the directory where
that image is located).

2. Do save(myobject, file="myobject.rda")

3. At this point, you have two choices: a) Quit R and re-start in the
directory where the 2nd workspace is located, or b) clear everything in the
workspace in memory by, e.g., rm(list=ls()), then
setwd("where/the/second/workspace/image/lives") and load(".RData").  The
first is probably safer.

4. Do load("/path/to/the/first/workspace/myobject.rda").

5. Do save.image().

Well, you get the idea...  Check the help pages for these functions.

Andy

> -----Original Message-----
> From: Adaikalavan Ramasamy [mailto:ramasamy at stats.ox.ac.uk]
> Sent: Thursday, August 01, 2002 3:16 PM
> To: Deborah S. Rocha; R-help at stat.math.ethz.ch
> Subject: Re: [R] copying objects
> 
> 
> You might be interested in ?dump and ?source (requires 
> library 'foreign').
> There might be a more elegant way though.
> 
> ----- Original Message -----
> From: "Deborah S. Rocha" <stungis at lanl.gov>
> To: <R-help at stat.math.ethz.ch>
> Sent: Thursday, August 01, 2002 7:09 PM
> Subject: [R] copying objects
> 
> 
> > Hello,  How does one copy objects between Workspaces?
> >
> > Thank you,
> >   Deborah
> > 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> -.-.-.-.-.-.
> -.-.-
> > 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
> >
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> _._._._._._._.
> _._
> >
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> -.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> _._._._._._._._._
> 

------------------------------------------------------------------------------
Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it.

==============================================================================

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