On Thu, Jun 9, 2016 at 1:13 AM, Edzer Pebesma
wrote:
> When running
>
> a = runif(10)
> class(a) = "foo"
> Math.foo = function(x, ...) {
> NextMethod(.Generic)
> }
> signif(a, 3)
> cumsum(a)
>
>
> I don't understand why cumsum strips the class, but signif does not.
> Both claim in the document
When running
a = runif(10)
class(a) = "foo"
Math.foo = function(x, ...) {
NextMethod(.Generic)
}
signif(a, 3)
cumsum(a)
I don't understand why cumsum strips the class, but signif does not.
Both claim in the documentation that "These are generic functions:
methods can be defined for them indi