Hi,
I'd like to clarify my previous posting.  See below - my updates are noted with *s
Thanks,
Sarah Ordaz
ordazs@upmc.edu

Hello,

I am a newbie to the lattice package in R, and I'm trying to make a plot using the xyplot function.  I have repeated measures data (2 conditions) for two different groups of subjects (teens and adults).

So far, I've made a basic graph using xyplot(y ~x, group=subnum, data=mydata, type="b").
*y is cognitive performance
*x is pupil diameter
*subnum = subject number
*agegrp = age group (either teens or adults)
*Here is "mydata", a sample data set:

subnum  agegrp condition  pupil(x)   cognitive(y)
101           T         A          5.4            97
101           T        B          4.4            98
102           T         A          3.1            88
102           T         B          4.9            95
103           A         A          5.3            75
103           A         B          4.2            83
104           A         A          5.8            84
104           A         B           6.1            65


Now I would like to make all the teens' lines one color and the adults' another.  Additionally, I'd like to reformat the dots so that the points referencing condition A and condition B are different.  Can you help me with this?

Thanks!
Sarah

Sarah Ordaz
ordazs@upmc.edu<mailto:ordazs@upmc.edu>
Laboratory of Neurocognitive Development
University of Pittsburgh
121 Meyran Avenue
Loeffler Building Rm 113
Pittsburgh, PA 15213
412.383.9972
http://www.wpic.pitt.edu/research/lncd/


	[[alternative HTML version deleted]]


