[Rd] couldn't find function "setClass"

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Sep 16 21:21:04 MEST 2003


On Tue, 16 Sep 2003, John Chambers wrote:

> Jeff Gentry wrote:
> > 
> > Hello ...
> > 
> > With a new checkout of R-devel (last update was 2003-09-11) we are having
> > a problem (it seems to be happening to all of us here on a few different
> > machines) where during install/check/etc when the 'save image' happens (in
> > packages using 'save image'):
> > 
> > ** save image
> > Error: couldn't find function "setClass"
> > Execution halted
> > 
> > This is for all packages that are using classes.
> > 
> > Is anyone else having this problem?
> 
> With packages that do NOT have a namespace but DO have saved images,
> yes. (!)
> 
> The problem seems to be that the current version of INSTALL doesn't end
> up with library(methods) in this branch (related to --vanilla ?).  One

It's not related to --vanilla, which does not change the packages loaded.
See Kurt's comment for what I believe is the true reason.

> workaround seem to be to change INSTALL (or scripts/INSTALL.in) as
> follows:
> 
> 522c522
> <       code_cmd="eval cat \"${code_file}\""
> ---
> >       code_cmd="eval echo \"library(methods)\"; cat \"${code_file}\""
> 
> to explicitly attach the library.  This may in fact be the right fix,
> but I'm confused as to why this is happening now.

I don't think so: methods is currently optional and Doug's fix seems to be 
to be the right one.

-- 
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-devel mailing list