[R] Moving data from one workspace to another

apjaworski at mmm.com apjaworski at mmm.com
Thu Aug 2 01:56:14 CEST 2007


Walter,

Here is what I do in similar situations.  I am on WinXP but this should be
similar on other systems (I hope).

1.  I start R with the new .RData workspace (usually by double-clicking on
it).
2.  I go to File < Change Dir menu item.
3.  I change the directory to where the old .RData is.
4.  I do attach(".RData")

The old .RData is no in position 2 of the search path.  You can see what is
there by doing ls(2).  Then you can copy anything, say a data frame named
dd, by just doing dd <- dd.

Cheers,

Andy

__________________________________
Andy Jaworski
518-1-01
Process Laboratory
3M Corporate Research Laboratory
-----
E-mail: apjaworski at mmm.com
Tel:  (651) 733-6092
Fax:  (651) 736-3122


                                                                           
             "Walter R.                                                    
             Paczkowski"                                                   
             <dataanalytics at ea                                          To 
             rthlink.net>              r-help at stat.math.ethz.ch            
             Sent by:                                                   cc 
             r-help-bounces at st                                             
             at.math.ethz.ch                                       Subject 
                                       [R] Moving data from one workspace  
                                       to another                          
             08/01/2007 04:27                                              
             PM                                                            
                                                                           
                                                                           
                                                                           
                                                                           





   Hi,
   Suppose  I have a dataframe in one workspace (a .RData file) dedicated
   to one project.  I then create a new workspace (a new .RData file) for
   another  project  but  I want to move or copy the dataframe to the new
   workspace.   How can I do this efficiently?  Just do a dump and then a
   source?  Is there another way?
   Thanks,
   Walt Paczkowski

   _________________________________
   Walter R. Paczkowski, Ph.D.
   Data Analytics Corp.
   44 Hamilton Lane
   Plainsboro, NJ  08536
   (V) 609-936-8999
   (F) 609-936-3733
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list