On 2010-07-02 9:57, Rajarshi Guha wrote:
Hi, I have a lattice lot conditioned on two variables. Example code is:
library(lattice)
x<- data.frame(d=runif(100),
f1=sample(c('yes', 'no'),100,replace=TRUE),
f2=c(rep('Run1',30),rep('Run2',30),rep('Run3',40)))
histogram(~d | f1 + f2, x)
In the plot, for a given value of f2, there are two panels, one for
'n' and one for 'yes'. But above each panel I get the value of f2.
What I'd like to be able to do is to have the value of f2 span the two
panels (ie merge the green rows and use a single label).
Any pointers as to how I could acheive this would be appreciated
Thanks,
I like the useOuterStrips() function in the latticeExtra
package for this:
useOuterStrips(histogram(~d | f1 + f2, x))
-Peter Ehlers
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.