Here's a lattice solution using some faked data.
library(lattice)
testdat - data.frame(time = rep(rep(1:10, each = 4), 8),
y = rnorm(320),
gender = factor(rep(rep(c('F', 'M'), each = 80), 2)),
grade = factor(rep(c('1-3', '4-6'),
You may want to check out examples in lattice and ggplot2. Both of
these make plotting subsets much easier. I can't remember the lattice
syntax off the top of my head, but if you post some example data –
either by creating it or using dput – people will be able to help out
easier. Here is some
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
3 matches
Mail list logo