Re: [Rd] cumsum method in Math group

2016-06-09 Thread Michael Lawrence
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

[Rd] cumsum method in Math group

2016-06-09 Thread Edzer Pebesma
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