[R] match.call() with default parameters

wwsprague@ucdavis.edu wwsprague at ucdavis.edu
Wed May 19 21:06:22 CEST 2004


version 1.9.0
debian linux

Is there a way to get match.call() to return the parameters that are 
assigned by default?

E.G.:

  f = function(x, y=2, ...) {return(as.list(match.call()))
f(33, z=4)

I want:

[[1]]
f

$x
[1] 33

$y
[1] 2

$z
[1] 4

I get:

[[1]]
f

$x
[1] 33

$z
[1] 4

Thx
W




More information about the R-help mailing list