[R] Consistent behaviour of for-loop

Uwe Dippel udippel at uniten.edu.my
Thu Apr 15 13:00:57 CEST 2010

Peter Ehlers wrote:
> You are mixing 'traditional' graphics (par(...)) and
> 'lattice' graphics.
> That won't work. In lattice, you use the 'layout' argument to
> select the number of columns/rows. This is easiest if you set
> up a conditioning variable:
>   cond <- gl(12, 20, labels = letters[1:12])
>   x <- rnorm(12*20)
>   qqmath(~x | cond, layout = c(4, 3))
> Note that layout = c(columns, rows), not c(rows, columns).
> Since you're new to R, let me also recommend very strongly
> that you learn to use the str() function (not needed for
> this problem, but undoubtedly indispensible in your further
> adventures in R-land).
Nice example, and good recommendation!

(It is difficult to satisfy me:)
How can one know/see, what is traditional graphics, and what is lattice 
graphics? Or is it try-and-fail-and-use-the-alternative?



More information about the R-help mailing list