Re: [R] Code to construct table with paired data

2017-04-08 Thread Mauricio Cardeal
y, the > tidyversalists can come up with something easier.) > > With a bit stronger assumptions on the data set (all pairs complete and in > same order for both treatments), there is also > >> table(A=imprfac[treatfac=="A"], B=imprfac[treatfac=="B"]) > B &

[R] Code to construct table with paired data

2017-04-08 Thread Mauricio Cardeal
Hi! Is it possible to automatically construct a table like this: #treat B # improvement # + - #treat A improvement + 1 3 # - 2 1 From these data: pair <- c(1,1,2,2,3,3,4,4,5,5,6,6,