[R] "contingency table" for several variables

David Meyer david.meyer at wu-wien.ac.at
Wed Feb 21 16:21:46 CET 2007


David:

 >I ‘m trying to draw ONE table that summarize SEVERAL categorical 
 >variables
 >according to one classification variable, say “sex”. The result would 
 >look
 >like several contingency tables appended one to the other. All the 
 >variables
 >belong to a data frame.

 >The summary.formula in Hmisc package does something pretty close and is
 >ready for a Latex export  but I need either to get rid off the >percentage
 >(or put the count prior to the percentage )in the “reverse” option or 
 >to add
 >a chisquare test in the “response” method.


You could have a look at structable() in package vcd.


Best
David



More information about the R-help mailing list