Skip to content
Prev 22018 / 63424 Next

Help for methods

On 9/19/2006 9:16 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 summary(lm(...)) (or maybe just lm(...)), 
and I think that would be a huge mistake in the user interface.  Some 
functions have side effects, and you don't want to evaluate them unless 
the user asks you to.  Asking for help on something should give you 
help, it shouldn't do the thing.

Do you have an actual suggestion for a change to the current behaviour?

I'd say the long term solution is to get rid of S3 dispatch, so this 
isn't an issue.  There are improvements to S4 dispatch in 2.4.0, but I 
think there are very high barriers preventing people from using S4, so 
S3 will be around for a long time.

Duncan Murdoch