I need to remove the rows from the table function output, which have 0 counts in all the columns. Is there any easy way to do that?
table(ds$animal,ds$gender)
___ | M | F
Cat | 9 | 4
Dog | 0 | 0
Rat | 4 | 3
I just would like to see those rows:
___ | M | F
Cat | 9 | 4
Rat | 4 | 3