This does what you want:

expand.call <- function(definition = NULL, call = sys.call(sys.parent()),
expand.dots = TRUE)
# like match.call, but with all formal args instead of only the specified
ones
{
    ans <- as.list(match.call(definition, call, expand.dots))
    frmls <- formals(deparse(ans[[1]]))
    add <- which(!(names(frmls) %in% names(ans)))
    return(as.call(c(ans, frmls[add])))
}

Best,
Fabian

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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