[Rd] setIs?

Roger Koenker roger at ysidro.econ.uiuc.edu
Mon Mar 31 09:15:12 MEST 2003


Thanks, I've now updated again and this mornings problem is now ok.
But I'm still having trouble with installing the current version of
SparseM.  Both of the setMethod calls

setMethod("%*%",signature(x="matrix",y="matrix.csr"),.matmul.matrix.csr)
setMethod("%*%",signature(x="numeric",y="matrix.csr"),.matmul.matrix.csr)

generate errors like this:

Error in setMethod("%*%", signature(x = "matrix", y = "matrix.csr"), .matmul.matrix.csr) :
        The method for function "%*%" and signature x="matrix", y="matrix.csr"
		is sealed and cannot be re-defined
Execution halted

Is there some other way for us to handle such cases, or is this too aggressive behavior
on the part of setMethod?


email	rkoenker at uiuc.edu	Department of Economics Drayton House,
vox: 	217-333-4558		University of Illinois	30 Gorden St,
fax:   	217-244-6678		Champaign, IL 61820	London,WC1H 0AX, UK
							vox:	020-7679-5838

On Mon, 31 Mar 2003, Prof Brian Ripley wrote:

> That's not the current version you are using, and it does work in the
> current version.
>
> However, that was caused by an additional consistency check, so I believe
> it revealed a bug in the older version that we have not yet tracked down
> (but have turned the check off).
>
>
> On Mon, 31 Mar 2003, Roger Koenker wrote:
>
> > I've recently updated from an early February version of 1.7.0 to
> >
> > Version 1.7.0 Under development (unstable) (2003-03-25)
> >
> > and am now having problems with errors giving the message:
> >
> >   ' getExtends(ClassDef) : @ must be used on an object with a formal class'
> >
> > which seems to be caused by 'setIs("character","character or NULL")'
> > which attempts to define 'character' as an extension of the virtual
> > class 'character or NULL' defined in 'setClass("character or NULL")'.
> > If I try this:
> >
> > > library(methods)
> > > setClass("CN")
> > [1] "CN"
> > > setIs("NULL","CN")
> > > setIs("numeric","CN")
> > > setIs("character","CN")
> > Error in getExtends(ClassDef) : @ must be used on an object with a formal class
> >
> > The fact that 'setIs("numeric","CN")' and 'setIs("NULL","CN")' work just fine
> > leads me to believe that this is a bug in the new R-devel version.
>
> --
> 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 272860 (secr)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>



More information about the R-devel mailing list