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]]

______________________________________________
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.

Reply via email to