[R] Getting the argument list within a function
Liaw, Andy
andy_liaw at merck.com
Tue Sep 14 17:00:41 CEST 2004
Is formals() what you're looking for?
Andy
> From: Roger D. Peng
>
> Is there a way of getting the argument list of a function from within
> that function? For example, something like
>
> f <- function(x, y = 3) {
> fargs <- getFunctionArgList()
> print(fargs) ## Should be `alist(x, y = 3)'
> }
>
> Thanks,
>
> -roger
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
>
More information about the R-help
mailing list