[R] problem with restore and some .RData

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Jun 17 22:08:57 CEST 2004


The short answer is to add importFrom(stats, family) to MASS's NAMESPACE 
and reinstall.  Another way is to use

library(stats)

in your .Rprofile in that directory.

The real question is why your .RData is loading namespace MASS.  
Presumably some object in your workspace has MASS in its environment.
Please find out which and tell us exactly how you created it.  (Have you 
copied a MASS object, for example?)

On Thu, 17 Jun 2004, Ronaldo Reis Jr. wrote:

> Hi,
> 
> I have problem with the restore function in some .RData using R 1.9.0
> Look the error:
> 
> [ronaldo at zeus RAnalise]$ R
> ...
> Error: object 'family' not found whilst loading namespace 'MASS'
> Fatal error: unable to restore saved data in .RData
> 
> But if I load this .RData with the load() function all objects are recovered.
> 
> [ronaldo at zeus RAnalise]$ R --no-restore-data
> ...
> > ls()
> character(0)
> > load(".RData")
>  [1] ".Traceback"               "RespY"                   
>  [3] "Trat1"                    "Trat2" 
> ...
> [63] "varied.371.84210116.9"    "varied.371.842101169.5"  
> [65] "varied.371.8421011695.12"
> 
> All recovered objects work fine. I can use q() and save workspace
> image to quit session. But to load this .RData I need to use R with
> --no-restore-data option and load the .RData manually.
> 
> I try to find the problem, but I dont find this.

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