Re: [R] Reshape into a contingency table/Fisher's test

2006-10-03 Thread Jacques VESLOT
> test <- read.table("clipboard",sep=";",row=1,header=T, as.is=T) > test X00 X01 X10 X11 John.Mike 123 313 12 31 John.Jim54 57 39 36 John.Steve 135 47 47 74 Mike.Jim63 37 27 16 Mike.Steve 15 15 5 61 Jim.Steve6 10 34 35 > list.mat <- mapply(function(x,

[R] Reshape into a contingency table/Fisher's test

2006-10-03 Thread Serguei Kaniovski
Dear all, how can I "reshape"/"cast" the following matrix 00;01;10;11 John.Mike;123;313;12;31 John.Jim;54;57;39;36 John.Steve;135;47;47;74 Mike.Jim;63;37;27;16 Mike.Steve;15;15;5;61 Jim.Steve;6;10;34;35 into a set of stacked 2x2 contingency tables 0;1 John;123;12 Mike;313;31 John;54;39 Jim;57;3