[R] No output from (lattice) xyplot called within loops
ripley@stats.ox.ac.uk
ripley at stats.ox.ac.uk
Wed Apr 17 09:53:23 CEST 2002
You have to *print* the output from lattice. Auto-printing did this for
you in the first two cases but not the third.
On Wed, 17 Apr 2002, Wolfram Fischer - Z/I/M wrote:
> 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 )
^print( ^)
> }
>
> 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 ----------------
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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