Re: [R] Getting the argument list within a function

2004-09-14 Thread Peter Dalgaard
"Roger D. Peng" <[EMAIL PROTECTED]> writes: > 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)' > } > f func

RE: [R] Getting the argument list within a function

2004-09-14 Thread Liaw, Andy
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

Re: [R] Getting the argument list within a function

2004-09-14 Thread Roger D. Peng
Ergh, yes, that's exactly it. I didn't realize you could use it in that way. Thanks, -roger Jeff Gentry wrote: Is there a way of getting the argument list of a function from within that function? For example, something like Would formals() work for you here? _

Re: [R] Getting the argument list within a function

2004-09-14 Thread Jeff Gentry
> Is there a way of getting the argument list of a function from within > that function? For example, something like Would formals() work for you here? __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the p

[R] Getting the argument list within a function

2004-09-14 Thread 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 __ [E