From macrakis at alum.mit.edu  Mon Nov 23 17:24:24 2009
From: macrakis at alum.mit.edu (Stavros Macrakis)
Date: Mon, 23 Nov 2009 11:24:24 -0500
Subject: [Rd] Method dispatch for function
In-Reply-To: <8b356f880911180916w3366bcemd6c2afd5b2a0e4d1@mail.gmail.com>
References: <8b356f880911180916w3366bcemd6c2afd5b2a0e4d1@mail.gmail.com>
Message-ID: <8b356f880911230824x4b215dalcaf4f81ce336d17c@mail.gmail.com>

(I had sent this to r-help and got no responses -- perhaps r-devel is
a better list for this question?)

How can I determine what S3 method will be called for a particular
first-argument class?

I was imagining something like functionDispatch('str','numeric') =>
utils:::str.default , but I can't find anything like this.

For that matter, I was wondering if anyone had written a version of
`methods` which gave their fully qualified names if they were not
visible, e.g.

methods('str') =>
??? utils:::str.data.frame??? utils:::str.default
stats:::str.dendrogram??? stats:::str.logLik??? utils:::str.POSIXt

or

methods('str') =>
???? $utils
?????????? "str.data.frame" "str.default"??? "str.POSIXt"
???? $stats
?????????? "str.dendrogram" "str.logLik"

Thank you,

???????????? -s



[Rd] Method dispatch for function
Stavros Macrakis