[Rd] recursive default argument reference

From: Vadim Ogranovich <vograno_at_evafunds.com>
Date: Wed 10 Nov 2004 - 12:36:32 EST


Hi,

It seems that a formal function argument can not default to an "outer" variable of the same name:

> x <- "foo"
> ff <- function(x=x) x
> ff()

Error in ff() : recursive default argument reference
>

Is this intentional? Why?

I use R-1.9.1.

Thanks,
Vadim



R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed Nov 10 12:43:43 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 09:01:17 EST