[Rd] How S3method() is implemented and called? And when to use it?

blue sky bluesky315 at gmail.com
Sun Feb 14 19:32:22 CET 2010

R-exts.pdf discribes S3method a little bit. But I want to understand
more on how it is called, implemented and when to use it.

I don't find it in an R session. But I see S3method() in some NAMESPACE files.

> S3method
Error: object 'S3method' not found
> ?S3method
No documentation for 'S3method' in specified packages and libraries:
you could try '??S3method'

I don't understand why S3method is necessary.

My understanding is that we can always use
print.foo(<something) {<function body>} # and appropriate exporting
to replace
S3method(print, foo)
, right?

Or I misunderstand something?

More information about the R-devel mailing list