-
Notifications
You must be signed in to change notification settings - Fork 195
Closed
Description
When checking if a function is an S3 generic (after getting it from the NAMESPACE file for example), a call to isS3stdGeneric() is used to tell if the function is an S3 generic. This works well for standard generics (when the first expression in the body calls UseMethod() [1]), but doesn't work so well if there is any sort of pre-processing in the generic (e.g.vctrs::vec_ptype_full which runs some dots checking before calling UseMethod)
> isS3stdGeneric(vctrs::vec_ptype_full)
[1] FALSE
I've looked a bit and haven't yet found a function that will find both standard and non-standard S3 generics. Would it be better / ok to fall back to the prior check of is.function(fun)? Or have an option to do that?
[1] - https://stat.ethz.ch/R-manual/R-devel/library/utils/html/isS3stdGen.html
Metadata
Metadata
Assignees
Labels
No labels