From bluesky315 at gmail.com  Sun Feb 14 19:32:22 2010
From: bluesky315 at gmail.com (blue sky)
Date: Sun, 14 Feb 2010 12:32:22 -0600
Subject: [Rd] How S3method() is implemented and called? And when to use it?
Message-ID: <48413fa11002141032g1a21d93eg9ce33be7bfb534e9@mail.gmail.com>

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?



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