Skip to content
Prev 48566 / 63424 Next

R CMD check warning with S3 method

On 30/06/2014 8:51 AM, Michael Lawrence wrote:
It depends how the user formulates it.  The usual ?foo will find at 
least two hits.  But if a user qualifies it by saying ?pkg::foo,
they'll just get the redirect page.

I think we need ?pkg::foo to do something, and this seemed easier than 
inventing an invisible redirect.
I think some users would like to know that pkg::foo is identical to 
original::foo, so if we had the invisible redirect, I think the target 
page should be modified to say "redirected from ...", just so the users 
were sure they had come to the right place.
Those are both benefits of your approach, which I wouldn't object to if 
you go ahead and do it subject to the qualifications above, and one 
other.  How should existing redirects be handled?  If a package imports 
and re-exports a symbol without change, should the author be 
encouraged/required to use exportFrom?  If we do nothing, most people 
will just do what they're currently doing, so maybe some sort of nag 
should be added.  Package writers won't like that unless there's some 
obvious benefit to the change.

Duncan