I have a dataframe that looks like this:
str(Data)
'data.frame': 11520 obs. of 29 variables:
$ groupname : Factor w/ 8 levels "Control","Treatment1",..: 1 1 1 1 1 1 1 1 1 1 ...
$ fCycle : Factor w/ 2 levels "Dark","Light": 2 2 2 2 2 2 2 2 2 2 ...
$ totdist : num 0 67.5 89.8 109.1 58.3 ...
#etc.
I can do a single plot of Treatment1 vs Control like this:
qq(groupname~totdist|fCycle, data=Data,
subset=(groupname=='Control'|groupname=='Treatment1'))
It looks like this:
I'd like to automatically make similar plots of Treatment2 vs Control ...TreatmentX vs Control. Is this the place for a loop or does lattice have a better way?