[R] lattice: calling functions

Wolfram Fischer wolfram at fischer-zim.ch
Tue Feb 14 14:56:06 CET 2006


I defined three functions:

> fun0 <- function( x=1:5, y=1:5, ... ) xyplot( y ~ x, ... )

> fun1 <- function( x=1:5, y=1:5, ... ) fun2( y ~ x, ... )
> fun2 <- function( ... ) xyplot( ... )

The call of fun0() works as expected.

The call of fun1() causes the following error:
    'Error in eval(expr, envir, enclos) : object "y" not found'

How should I define fun2 to avoid the error?

Thanks - Wolfram




More information about the R-help mailing list