[Rd] recursive default argument reference

Vadim Ogranovich vograno at evafunds.com
Wed Nov 10 02:36:32 CET 2004


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



More information about the R-devel mailing list