[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;

Is there a nice way to find out if a function is generic: something like 

Many thanks,


- the latest version of this code will be on GitHub:

More information about the R-help mailing list