[R] About .RData

Stephen Liu satimis at yahoo.com
Sun Aug 15 16:24:21 CEST 2010


----- Original Message ----

From: Michael Bedward <michael.bedward at gmail.com>
To: Stephen Liu <satimis at yahoo.com>
Cc: r-help at r-project.org
Sent: Sun, August 15, 2010 3:43:55 PM
Subject: Re: [R] About .RData

>> Furthermore can I run following command on R?
>> rm /home/userA/.RData

> .RData contains all of the objects in a workspace (your data,
> functions etc.).  If you start R in a directory that contains a .RData
> file it will be loaded automatically.

> If you delete the file you are deleting your data.

> Does that answer your question ?


Hi Michael, 

Thanks for your advice

Windows 7
Ubuntu 10.04
(both 64 bits)

I have Windows R and Linux R running on VM (guest) of Oracle VirtualBox. 

Before I tested ANOVA on Linux R.  On existing R - q(), I mistakenly typed y 
resulting in the file .RData created (I suppose).  Thereafter on starting R the 
line  "[Previously saved workspace restored]" is displayed.

Running;
> list.files(getwd(),full.names=TRUE,all.files=TRUE)
 [1] "/home/satimisub04dk01/."                        
 [2] "/home/satimisub04dk01/.."                       
 [3] "/home/satimisub04dk01/.adobe"                   
....
....            
[41] "/home/satimisub04dk01/R"                        
[42] "/home/satimisub04dk01/.RData"                   
......        
[54] "/home/satimisub04dk01/.xsession-errors.old"
- end -


On Windows R
Starting R doesn't have the abovementioned line displayed.

> list.files(getwd(),full.names=TRUE,all.files=TRUE)
 [1] "C:/Users/Administrator/Documents/."                              
 [2] "C:/Users/Administrator/Documents/.."                             
 [3] "C:/Users/Administrator/Documents/AOD_V3010287_XpVistaWin7.zip"   
 [4] "C:/Users/Administrator/Documents/ASUSUpdt_V71702_XPVistaWin7.zip"
 [5] "C:/Users/Administrator/Documents/Default.rdp"                    
 [6] "C:/Users/Administrator/Documents/desktop.ini"                    
 [7] "C:/Users/Administrator/Documents/EPU_V10022_XPVistaWin7.zip"     
 [8] "C:/Users/Administrator/Documents/ExpressGate_v14910_Patch.rar"   
 [9] "C:/Users/Administrator/Documents/M4A78T-E-QVL.zip"               
[10] "C:/Users/Administrator/Documents/MB_WIN7_ATK.ZIP"                
[11] "C:/Users/Administrator/Documents/My Music"                       
[12] "C:/Users/Administrator/Documents/My Pictures"                    
[13] "C:/Users/Administrator/Documents/My SAS Files(32)"               
[14] "C:/Users/Administrator/Documents/My Videos"   


Now my questions are;

1) After deleting .RData on Linux R whether the abovementioned line will not 
popup again?

2) Why on Windows R the path of the folders/directories shows the Administrator;
[1] "C:/Users/Administrator/Documents/."
......
???

Not the user?  I login as user.

A further thought, I recall that I login as Administrator to install R.  Does it 
matter?.  How to change the path back to user?

TIA


B.R.
Stephen L






More information about the R-help mailing list