[R] how to get accumulate contingency table

2008-03-17 Thread alex chin
Hi, all. I got a lot of help from the this mailing list, it save me a lot of time. Here is my question. x<-rep(c(2,3,4),20)y<-sample(rep(c(0,1),30))tr<-rep(c(1:5),6)data1<-data.frame(x,y,tr)data1<-data1[order(data1$tr),]> data1 x y tr1 2 0 16 4 1 111 3 0 116 2 0 121 4 0 126 3

[R] how to get accumulate contingency table

2008-03-17 Thread alex chin
Hi, all. I got a lot of help from the this mailing list, it save me a lot of time. Here is my question. x<-rep(c(2,3,4),20) y<-sample(rep(c(0,1),30)) tr<-rep(c(1:5),6) data1<-data.frame(x,y,tr) data1<-data1[order(data1$tr),] > data1 x y tr1 2 0 16 4 1 111 3 0 116 2 0 121 4