On Mar 23, 2008, at 11:31 AM, Plantky wrote: > Hi everyone, > > Is there a way to include both mean and median in a bwplot? And what > should I do to convert the median dots into lines?
Did you look at the documentation for bwplot and panel.bwplot? This should do it , adjust at will: ex <- data.frame(x=1:10, y=rep(c("A","B"), 5)) bwplot(y~x, data=ex, panel=function(x,y,...) { panel.bwplot(x, y, pch="|", ...) panel.points(mean(x), y, col="red", ...) }) If you want the mean lines to appear as lines as well, you'll likely want to look into the actual code of panel.bwplot, to see what it does when pch="|". > Thanks! > Plantky Haris Skiadas Department of Mathematics and Computer Science Hanover College ______________________________________________ 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.