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 individually or via the ‘Math’ group
generic."

-- 
Edzer Pebesma
Institute for Geoinformatics  (ifgi),  University of Münster
Heisenbergstraße 2, 48149 Münster, Germany; +49 251 83 33081
Journal of Statistical Software:   http://www.jstatsoft.org/
Computers & Geosciences:   http://elsevier.com/locate/cageo/
Spatial Statistics Society http://www.spatialstatistics.info

Attachment: signature.asc
Description: OpenPGP digital signature

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to