Re: [R] Getting parameters from within function

About this list Date view Thread view Subject view Author view Attachment view

From: Jason Turner (jasont@indigoindustrial.co.nz)
Date: Tue 04 May 2004 - 12:00:02 EST


Message-id: <4096F922.6010801@indigoindustrial.co.nz>

user@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

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:07 EST