[R] Default Generic function for: args(name, default = TRUE)
Leonard Mada
|eo@m@d@ @end|ng |rom @yon|c@eu
Wed Mar 8 20:09:11 CET 2023
Dear R-Users,
I want to change the args() function to return by default the arguments
of the default generic function:
args = function(name, default = TRUE) {
# TODO: && is.function.generic();
if(default) {
fn = match.call()[[2]];
fn = paste0(as.character(fn), ".default");
name = fn;
}
.Internal(args(name));
}
Is there a nice way to find out if a function is generic: something like
is.function.generic()?
Many thanks,
Leonard
=======
Note:
- the latest version of this code will be on GitHub:
https://github.com/discoleo/R/commits/master/Stat/Tools.Code.R
More information about the R-help
mailing list