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

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to