Hi, Two questions: 1) I have a data.frame of binary factors (x, y, z, ...) and would like to do tables like "table(a,b)" for any combination of factors, 2 by 2. I.e. I'm looking for the equivalent of table(x,y) table(x,z) table(y,z) ... Is there a simple way to do this? 2) Similar to the above: I have the same data.frame of binary factors and would like to do tables like "table(a,b)" for the combinations of one factor(x) with all the others, i.e. the equivalent of table(x,y) table(x,z) table(x, ...) table(x, ...) ... --------------- table(data.frame) gives too many tables, i.e. it gives 2-by-2 tables for all the combinations of all the factors. Most of these tables contain only zeros. The factor levels are named differently for each factor, so apply(data.frame, 2, table) doesn't make sense. Any help appreciated, Niklaus