The 4 variables I have are: Breathless(B)= {y,n}, wheeze(W)= {y,n}, age={g1,g2,...,g5}, and count= {20 numeric counts}. I would like to construct a table as shown in the image, however the ftable function is unable to arrange the output properly into a table. How else can I construct it? Thanks in advance!
Construct 3-way contingency table in R
1.3k Views Asked by siegfried At
2
You can try to reshape your data using
dcast
fromdata.table