From: William Pepe <williampepe_at_hotmail.com>

Date: Thu, 05 Jun 2008 11:06:52 -0400

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 Thu 05 Jun 2008 - 17:07:20 GMT

Date: Thu, 05 Jun 2008 11:06:52 -0400

Hoping someone can help me with some graphics. Here is my data set.

A B

1

5

1

5

1

6

2

7

3

7

4

7

5

8

6

9

6

10

7 11

Using this code, I split the data into two groups, each of size 5, and made a scatterplot.

Bill<-read.table('something here')

attach(Bill)Bill.s<-split(Bill, rep(1:2, each=5))
plot(A,B,col='black')

$`1` A B1 1 52 1 53 1 64 2 75 3 7

$`2` A B 6 4 7 7 5 8 8 6 9 9 6 1010 7 11

For each group, I calculate the mean of B....For group 1, mean of B is 6. For group 2, mean of B is 9.

On the scatterplot of A vs. B, for group 1, I want a horizontal line at the mean of 6. It should only cover group 1. For group 2, a horizontal line at the mean of 9. Again, should only cover the points in group 2.

The endpoints of the different horizontal lines must connect.

Can anybody give me any help? Thanks in advance.

Bill

sh_skydrive_062008

[[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 Thu 05 Jun 2008 - 17:07:20 GMT

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 Thu 05 Jun 2008 - 17:30:37 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.
*