Jesse Y Cai
2009-Apr-01 17:47 UTC
[R] Lattice plot with an extra strip showing group weights
Dear r-help, How can I add a strip to show group weights using lattice package? For example, in the following code, I'd like to using "wt" variable in a trip to demonstrate the relative size of groups. (Following is just the simplest form to demonstrate the question. A conditional variable will be added to the bwplot in real problems). ##################################### library(lattice) # generate data x1 <- cbind(rnorm(50,1,1),rnorm(50,10,1),1) x2 <- cbind(rnorm(50,2,1),rnorm(50,20,1),2) x <- as.data.frame(rbind(x1,x2)) names(x) <- c("x","wt","group") # plot bwplot(x ~ group, data=x,horizontal=FALSE) ###################################### Thanks in advance for this great R group! Regards, Marvel1812 [[alternative HTML version deleted]]