The convention for documenting S4 methods provides a general way to get
the documentation for a method, given the name of the function and the
name(s) of the classes in the signature:
method?"FUN,CLASS1,CLASS2,..."
where FUN is the name of the function and CLASS1, etc. are the names of
the c
> See the .helpForCall function in utils. It would recognize that the
> function was an S4 generic, and then work out the signature and look for
> matching help. I think working out the signature in the case above
> would require it to call lm(...). So there's a precedent for what I
> called a "
On 9/30/2006 1:17 AM, hadley wickham wrote:
>> Yes, I agree that the current help system doesn't work very well on S3
>> methods. But I don't know how to fix it. I think the only way it could
>> know what to do on a construction like
>>
>> ?summary(lm(...))
>>
>> would be to actually evaluate sum
> Yes, I agree that the current help system doesn't work very well on S3
> methods. But I don't know how to fix it. I think the only way it could
> know what to do on a construction like
>
> ?summary(lm(...))
>
> would be to actually evaluate summary(lm(...)) (or maybe just lm(...)),
> and I thin
> I think the spirit of Hadley's request could be handled by introducing a
> declaration for S3 methods and by inserting S4-style alias{} lines into
> their documentation. For example, if a function, say
> setOldGeneric("summary"), similar to setOldClass, informed the system that
> "summary" was
It's not likely that S3 methods will ever go away, at least in the sense
that all the code using them would be rewritten. What we can work
towards is to make more of the automated tools work for S3 methods as
well as S4. This will usually involve package owners generating some
information, th
On 9/19/2006 9:16 AM, hadley wickham wrote:
>> In the alpha of 2.4.0, both suggestions above work, as do ?summary and
>> ?summary(data.frame()). ?summary(lm()) gives the same man page, rather
>> than the summary.lm page (but the page does have a link to that page).
>
> That's great.
>
> The fact
> I do not follow this. When I type ?summary.data.frame I get a
> summary help page where I can also find info about S3 method for class
> 'data.frame'. If I am not wrong it is
>
> \alias{summary.data.frame}
>
> that takes care of this.
Oops, summary.data.frame was a bad example, except perhaps to
> > But you also have to be able to identify if it is a S3 function or an
> > S4 method (or an ordinary function).
>
> Why not just type ?summary, which as I said, does tell you up front?
If R can save the novice user a couple of steps in their search for
help, why not do it?
Getting documentatio
On Tue, 19 Sep 2006, hadley wickham wrote:
>> > Well, I know that, and you know that, but how is anyone supposed to
>> > figure it out? It means that you need to have a working knowledge of
>> > the S3 and S4 class systems before you can use the help to reliably
>> > get the documentation you nee
> In the alpha of 2.4.0, both suggestions above work, as do ?summary and
> ?summary(data.frame()). ?summary(lm()) gives the same man page, rather
> than the summary.lm page (but the page does have a link to that page).
That's great.
The fact that summary includes a link to summary.lm is relevant
On my system all three of the ?summary commands listed in your
post bring up help (if you add the missing parenthesis to the middle one).
I am using "Version 2.3.1 Patched (2006-06-04 r38279)" on Windows XP.
On 9/18/06, hadley wickham <[EMAIL PROTECTED]> wrote:
> Help for help says:
>
> The 'topi
> > Well, I know that, and you know that, but how is anyone supposed to
> > figure it out? It means that you need to have a working knowledge of
> > the S3 and S4 class systems before you can use the help to reliably
> > get the documentation you need.
>
> For S3 you do to understand that there ar
Hin-Tak Leung cimr.cam.ac.uk> writes:
>
> You are supposed to do:
>
> ?summary.lm
> ?summary.data.frame
>
> for S3 methods. The former works, the latter doesn't - which is
> probably considered a bug, but then the usage of some of the
I do not follow this. When I type ?summary.data.frame I ge
On 9/19/2006 8:52 AM, hadley wickham wrote:
>> You are supposed to do:
>>
>> ?summary.lm
>> ?summary.data.frame
>>
>> for S3 methods. The former works, the latter doesn't - which is
>> probably considered a bug, but then the usage of some of the
>> generics are probably considered obvious and funda
On Tue, 19 Sep 2006, hadley wickham wrote:
>> You are supposed to do:
>>
>> ?summary.lm
>> ?summary.data.frame
>>
>> for S3 methods. The former works, the latter doesn't - which is
?summary.data.frame does work on my systems.
>> probably considered a bug, but then the usage of some of the
>> gen
> You are supposed to do:
>
> ?summary.lm
> ?summary.data.frame
>
> for S3 methods. The former works, the latter doesn't - which is
> probably considered a bug, but then the usage of some of the
> generics are probably considered obvious and fundamental enough
> that summary.data.frame doesn't real
You are supposed to do:
?summary.lm
?summary.data.frame
for S3 methods. The former works, the latter doesn't - which is
probably considered a bug, but then the usage of some of the
generics are probably considered obvious and fundamental enough
that summary.data.frame doesn't really behave in any
Help for help says:
The 'topic' argument may also be a function call, to ask for
documentation on a corresponding method. See the section on
method documentation.
and
The authors of formal ('S4') methods can provide documentation on
specific methods, as well as ove
19 matches
Mail list logo