[R] About .RData

Michael Dewey info at aghmed.fsnet.co.uk
Mon Aug 16 18:50:51 CEST 2010


At 21:20 15/08/2010, Duncan Murdoch wrote:
>On 15/08/2010 10:24 AM, Stephen Liu wrote:
>>----- 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?
>
>You probably set the startup directory in the shortcut when you did 
>the install.  (I believe that's the default behaviour.)  So you need 
>to edit the shortcut to a different directory, possibly with a 
>separate shortcut for each user.  The editing is done through 
>Windows, by right-clicking on the shortcut.
>
>Duncan Murdoch

I find it is best to tell R when i install it _not_ to supply a 
shortcut and then as Duncan suggests establish one myself as the 
user. The alternative is to set the permissions so you can reset the 
startup directory within the shortcut.

>>TIA
>>
>>B.R.
>>Stephen L
>>
>>
>>______________________________________________
>>R-help at r-project.org 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.
>
>

Michael Dewey
http://www.aghmed.fsnet.co.uk



More information about the R-help mailing list