Dear all,
This problem came up initially while debugging a function, but it
seems to be a more general problem of R. I hope I'm wrong, but I can't
find another explanation. Let me illustrate with the raster package.
For an object RasterLayer (which inherits from Raster), there is a
method
Joris,
I looked at the problem. Here is a minimal example reproducing
the error
setGeneric(myplus,function(x,y,...) standardGeneric(myplus))
setMethod(myplus,c(x=numeric,y=numeric),
function(x,y,z=0) x+y+z
)
setMethod(myplus,c(x=numeric,y=list),
function(x,y,...)
On 8/26/2010 8:43 AM, Niels Richard Hansen wrote:
setGeneric(myplus,function(x,y,...) standardGeneric(myplus))
setMethod(myplus,c(x=numeric,y=numeric),
function(x,y,z=0) x+y+z
)
setMethod(myplus,c(x=numeric,y=list),
function(x,y,...) callGeneric(x,unlist(y),...)
On 26/08/10 18.42, Martin Morgan wrote:
On 8/26/2010 8:43 AM, Niels Richard Hansen wrote:
setGeneric(myplus,function(x,y,...) standardGeneric(myplus))
setMethod(myplus,c(x=numeric,y=numeric),
function(x,y,z=0) x+y+z
)
setMethod(myplus,c(x=numeric,y=list),
function(x,y,...)
4 matches
Mail list logo