[R] No output from (lattice) xyplot called within loops

Wolfram Fischer - Z/I/M wolfram at fischer-zim.ch
Wed Apr 17 09:38:33 CEST 2002


Hello

>From the following script I received 
a grafic output when I called:

	- xyplot.test( 'green3' )
	- call.xyplot.test( 'blue3' )

I did NOT receive a grafic output 
when I called:

	- loop.xyplot.test( 'red3' )

What's the Problem?

NB: I am using R 1.4.1 on Linux.

--------- START OF SCRIPT ----------------
n <- 1000
x <- seq( 1, n )
y <- rnorm( n )

xyplot.test <- function( col ){
	xyplot( y ~ x , col=col )
}

call.xyplot.test <- function( col ){
	xyplot.test( col )
}

loop.xyplot.test <- function( c.col ){
	for( col in c.col ){
		xyplot.test( col )
	}
}

--------- END OF SCRIPT ----------------

Wolfram Fischer
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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