Dear Juliet,

Perhaps start here:

require(lattice)
mwpp <- data.frame(y = c(43,42,26,39,60,60,46,40,41,36,42,54,
	58,43,46,56,81,56,70,70,44,52,81,59,69,68),
	sex = rep(c(rep('men', 14), rep('women', 12))),
	pp = c(rep(c('pre', 'post'), each = 7), rep(c('pre', 'post'), each =  
6)),
	sub = c(1:7, 1:7, 8:13, 8:13))
xyplot(y ~ pp | sex, groups = sub, type = 'b', mwpp)

_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS:     P.O.Box 400400    Charlottesville, VA 22904-4400
Parcels:    Room 102        Gilmer Hall
         McCormick Road    Charlottesville, VA 22903
Office:    B011    +1-434-982-4729
Lab:        B019    +1-434-982-4751
Fax:        +1-434-982-4766
WWW:    http://www.people.virginia.edu/~mk9y/

On Aug 23, 2008, at 12:04 PM, Juliet Hannah wrote:

> Is there an easy way to make graphs for the following data. I have
> pretest and posttest scores for men and
> women. I would like to form a 'titlted segment' plot for the data.
> That is, make segments joining the scores,
> with different types of segments for men and women.
>
> Example data:
>
> menpre <- c(43,42,26,39,60,60,46)
> menpost <- c(40,41,36,42,54,58,43)
>
> womenpre <- c(46,56,81,56,70,70)
> womenpost <- c(44,52,81,59,69,68)
>
> Thanks!
>
> Juliet

	[[alternative HTML version deleted]]

