[R] Problem with RGui and MASS

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Aug 1 21:11:02 CEST 2004


Please make sure you have the current MASS -- this was worked-around a 
while back (and has been mentioned here several times), and 
update.packages() will almost certainly get you an update (post 1.9.1).

The cause is that namespace stats is not loaded when .RData is accessed,
but it is once R is running.  It should happen with Rterm started in the
same directory as Rgui.

On Sun, 1 Aug 2004, Angelo Canty wrote:

> Hi,
> 
> Using R1.9.1 for Windows with Windows 2000 (also XP), I have come
> across the following problem that I have not seen before and am at
> a loss to explain.  If I create an object using rlm from library(MASS)
> and then save the workspace, I cannot reopen it using RGUI by double 
> clicking on the .RData file as I normally do.  If I double click on
> the icon, R starts and then gives the following message in a pop-up 
> dialog.
> 
> Fatal error: Unable to restore saved data in .RData
> 
> On the R console there is the further message
> 
> Error: object 'family' not found whilst loading namespace 'MASS'
> 
> This does not occur when I use RTerm to start R 1.9.1 nor does it
> happen with RGui 1.8.1.  Even more puzzling (at least to me) is that
> if I open RGui 1.9.1 and use load to load the workspace then it
> works fine.  This is a bit of a pain however as I have a lot of
> .RData files in different directories and double clicking on them
> opens RGui with the appropriate working directory.
> 
> Has anyone observed this before or know what the problem might be?
> Is it something that I did wrong (on two computers)? 
> 
> Here is a very simple example of the code I have used.
> 
> rm(list=ls(all=T)) # start with a blank slate
> x <- 1:10
> y <- rnorm(10, 1+2*x)
> model.rlm1 <- rlm(y~x)
> q(save=T)
> 
> Thanks for your help,
> Angelo
> 
> 

-- 
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list