[R] match.call() with default parameters

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

From: wwsprague@ucdavis.edu
Date: Thu 20 May 2004 - 05:06:22 EST


Message-id: <c8gb7q$225$1@sea.gmane.org>

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

______________________________________________
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:11 EST