I use large sets of contingency tables by looping table(). Simple problem: columns containing only 0's are omitted in the output. Can this be adjusted using table()?
Example:
data
1 0
0 0
1 0
0 0
0 0
1 0
1 0
1 0
1 0
The output I get:
table(data)
0
0 3
1 6
The output I need:
0 1
0 3 0
1 6 0
Thanks.