On Sun, Mar 5, 2017 at 8:13 PM, Gábor Csárdi <csardi.ga...@gmail.com> wrote: > Because the S3 class system is very informal. E.g. if you happen to > have an `if.whatever` function, that will be automatically a method of > your generic.
For example: x <- structure(1:10, class = "test") t(x) #> #> One Sample t-test #> #> data: x #> t = 5.7446, df = 9, p-value = 0.0002782 #> alternative hypothesis: true mean is not equal to 0 #> 95 percent confidence interval: #> 3.334149 7.665851 #> sample estimates: #> mean of x #> 5.5 -- http://hadley.nz ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel