[R] function returning all arguments of current call

Wolfram Fischer wolfram at fischer-zim.ch
Thu Jun 20 09:09:23 CEST 2002


Is there a FUNCTION_RETURNING_ALL_ARGS()
which would enable to define functions with
different default values?

f1 <- function( x=1, y=1, ... ) paste( 'x =', x, 'y =', y )
f2 <- function( x=2, y=2, ... ) f2( FUN_RETURNING_ARGS() )

f1( 10 )
#	[1] "x = 10, y = 1"
f2( 10 )
#	[1] "x = 10, y = 2"

Wolfram
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list