Thank you. It works!
On Thu, Dec 24, 2015 at 9:08 AM, Michael Lawrence
wrote:
> Yes, functions like c, min and max are special cases, as they are
> primitives. For ordinary functions, you just need to promote them with
> "..." as the signature:
>
> setGeneric("pmax", signature="...")
> setMethod(
Yes, functions like c, min and max are special cases, as they are
primitives. For ordinary functions, you just need to promote them with
"..." as the signature:
setGeneric("pmax", signature="...")
setMethod("pmax", "Class", function(..., na.rm=FALSE) { })
One caveat is that all arguments passed v
Hello,
I'm trying to override pmin and pmax for my own matrix. These two
functions have ... as an argument. I tried to override them as
follows:
setMethod("pmax", class_name, function(x, ..., na.rm) { ... })
I use this way to override primitive functions such as min/max and it
works fine.
But