From: Louis Plough <lplough_at_usc.edu>

Date: Tue, 28 Jun 2011 00:12:00 -0700

R-help_at_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. Received on Tue 28 Jun 2011 - 07:14:32 GMT

Date: Tue, 28 Jun 2011 00:12:00 -0700

> gtype<-c("AA","AB","BB")

x<-sample(gtype,20,replace=TRUE)

y<-sample(c(0,1),20,replace=TRUE)

bin.data<-data.frame(x,y)

xyplot(y~x, jitter.y=TRUE, jitter.x=TRUE,factor=.6, data=bin.data)

Then If I wanted to add the means to the plot, I would do this, which will print the mean points on a box plot, but not an xyplot:

means1 <- tapply(bin.data$y,bin.data$x,mean) points(means1,col="red",pch=18)

Is there a way to get the means, and even error bars on the same xyplot?

Thanks for any help in advance,

Louis

[[alternative HTML version deleted]]

R-help_at_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. Received on Tue 28 Jun 2011 - 07:14:32 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Tue 28 Jun 2011 - 19:30:17 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*