Hello, I need to plot the means of some outcome for two groups (control vs intervention) over time (discrete) on the same plot, for various subsets such as gender and grade level. What I have been doing is creating all possible subsets first, using the aggregate function to create the means over time, then plotting the means over time (as a simple line plot with both control & intervention on one plot) for one subset. I then use par() and repeat this plot for each gender x grade level subset so they all appear on one page.
This appears to me to be very similar to an xyplot, something like mean(outcome) ~ gender + gradelevel. However, I can't figure out how I could get both control and intervention lines in the same plot. Any suggestions? What i'm doing now -works-, but just seems to be the long way around. -Robin [[alternative HTML version deleted]] ______________________________________________ R-help@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.