[Rd] Caching bug with showMethods?
Seth Falcon
sfalcon at fhcrc.org
Wed Oct 18 16:30:12 CEST 2006
John Chambers <jmc at r-project.org> writes:
> No, not a bug.
>
> Inherited methods are never cached until they are needed, for rather
> obvious efficiency reasons. See ?showMethods, under argument
> inherited=
ok, I missed the doc, which is quite clear about showMethods not doing
what I wanted...
> If what you were trying to do was find out what method would be called
> for class "B" without calling it, use selectMethod().
Yes, that is what I was trying to do. I thought showMethods was the
preferred user interface to ask the system about what methods are
available.
When would one want the behavior of showMethods? Is it ever useful
for a user to ask, "what are the methods that have been cached?".
The problem with using selectMethod is one needs to know in advance
the name of a generic. I would like to have a tool that lets me
discover "what can be done" with an instance of a given class.
showMethods is very close to being that tool, but the interaction with
the method caching makes it confusing (until one has a solid
understanding of the method caching, but IMHO this isn't something a
user should need to know about if at all possible).
Best,
+ seth
--
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
http://bioconductor.org
More information about the R-devel
mailing list