[R] question about the lattice package
RICHARD M. HEIBERGER
rmh at temple.edu
Sat Nov 14 06:22:34 CET 2009
The first step is to make Weather a factor. Then the levels would be displayed
in the strip labels.
The second step would be to change the level values to the actual strings
you want to see.
> tmp <- data.frame(Weather=1:3, x=rnorm(3), y=rnorm(3))
> xyplot(y ~ x | Weather, data=tmp)
> tmp$Weather <- factor(tmp$Weather)
> xyplot(y ~ x | Weather, data=tmp)
> levels(tmp$Weather) <- c("long string", "longer string", "short")
> xyplot(y ~ x | Weather, data=tmp)
> xyplot(y ~ x | Weather, data=tmp, layout=c(3,1))
More information about the R-help
mailing list