[R] manipulating "..." inside a function

Liaw, Andy andy_liaw at merck.com
Tue Mar 25 19:51:39 CET 2003


> From: Deepayan Sarkar [mailto:deepayan at stat.wisc.edu]
> On Friday 21 March 2003 02:36 pm, Liaw, Andy wrote:
> > Dear R-help,
> >
> > Can some one tell me how to do the following (if it's possible)?
> >
> > Suppose I have a function like this:
> >
> > f <- function(x, y, ...) {
> >     ## some code
> >     g(x, y, ...)
> >    ## some more code
> > }
> 
> Why not (in the context you describe below)
> 
> f <- function(x, y, panel.number, ...) {
>     ## some code
>     g(x, y, ...)
>    ## some more code
> }
> 
> ? (This is the trick usually used for the strip function in 
> particular.) 

Ah... Yes.  It didn't come me to put unwanted argument as part of the formal
parameters of the function to catch it.  Very nifty!  Thanks!

Andy


------------------------------------------------------------------------------



More information about the R-help mailing list