Re: [R] Lattice side by side boxplots with average

2012-05-09 Thread maxbre
thanks ilai that's exactly what I was looking for! in fact, I've been in trouble with: - the assignment of mean values to each factor (which is correctly sorted out by mean.values[x] as your example clearly show up) - and also with the position of mean values along x axis (because that "x + (gro

Re: [R] Lattice side by side boxplots with average

2012-05-08 Thread ilai
On Tue, May 8, 2012 at 9:32 AM, maxbre wrote: > and then with the superposition of relative average values to the boxplots, > i.e. something like: > > panel.points(…, mean.values, ..., pch = 17) Almost. You need to give panel.points the new x, and make sure the right mean.values go to the right

[R] Lattice side by side boxplots with average

2012-05-08 Thread maxbre
Given the following example library(lattice) attach(barley) After a long meandering around the web I managed to get a side by side boxplots through: bwplot(yield ~ site, data = barley, groups=year, pch = "|", box.width = 1/3, auto.key = list(points = FALSE, rectangles = TRUE, spac