What I'm trying to do is to figure out how to create lattice charts of
%right by region, or alternatively, by date from a dataset of observations
that looks something like this:

date,location,region,correct
2010-09-10,a,r1,yes
2010-09-10,a,r1,yes
2010-09-10,a,r1,no
2010-09-11,a,r1,yes
2010-09-01,b,r1,yes
2010-09-02,b,r1,no
2010-09-01,a,r2,yes
2010-09-02,a,r2,no
2010-09-02,a,r2,yes
2010-09-02,a,r2,no
2010-09-03,a,r2,yes
etc.

I get that I can do something like:
tmp<-xtabs(~correct+region+date,t)

This gets me partway by providing counts. The thing that I'm missing here is
how get from this to being able to plot, for example, a family of
lattice-style curves that looks something like:

%right (by region) on the y axis, with the x axis being the date

I've tried something
like barchart(xtabs(~correct+region+date,t),stack=F,auto.key=T) which gets
me close with the counts of observations, but I really am after the
proportions evaluated by region, not the counts.

I don't see how to marginalize prop.table properly to give me my answer
either (if, in region 1, on a given day, all are correct - then that number
should be 100% on the chart/graph, independent of what happened in region
2)- but I'm quite sure that I'm missing something obvious here.

Any suggestions would be appreciated.
Thanks,
mark

	[[alternative HTML version deleted]]

