[R] Getting parameters from within function
Jason Turner
jasont at indigoindustrial.co.nz
Tue May 4 04:00:02 CEST 2004
user at domain.invalid wrote:
> Hi R-Helpers
>
> Is there a way to access the parameters passed to a function all at
> once? I want something like:
>
> misc.params = list(...)
>
> except such that it works with formal named parameters.
>
Does match.call() do what you want?
foo <- function(x,y,long.winded.arguemnt.name,...) {
args <- match.call()
args
}
foo(rnorm(10),rnorm(10),"some text")
foo(x = rnorm(10), y = rnorm(10), long.winded.arguemnt.name = "some text")
Cheers
Jason
More information about the R-help
mailing list