Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 18369: enable isGeneric() to work from function definition for functions in base #74

Open
hturner opened this issue Oct 30, 2024 · 0 comments
Assignees
Labels
LatinR 2024 R Issue should require knowledge of R only review patch Test/review the proposed patch S4 methods S4 methods

Comments

@hturner
Copy link
Member

hturner commented Oct 30, 2024

For functions outside of the base package, isGeneric() works when the function is passed to the fdef argument

> methods::isGeneric(fdef = Matrix::cbind2)
[1] TRUE

This doesn't work for functions in base:

> methods::isGeneric(fdef = length)
Error in methods::isGeneric(fdef = length) : 
  argument "f" is missing, with no default

though it will work if you pass the function name instead:

methods::isGeneric(f = "length")
[1] TRUE

Gabe Becker (@gmbecker) raised this in Bug 18639 with the outline of a fix and R Core member Martin Maechler gave some feedback. This issue is to work with Gabe on developing and testing the patch.

@hturner hturner added review patch Test/review the proposed patch S4 methods S4 methods LatinR 2024 R Issue should require knowledge of R only labels Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LatinR 2024 R Issue should require knowledge of R only review patch Test/review the proposed patch S4 methods S4 methods
Projects
None yet
Development

No branches or pull requests

2 participants