[R] transforming table into data frame

Charles Raux charles.raux at let.ish-lyon.cnrs.fr
Thu Nov 17 20:20:30 CET 2005


Hello,
I would like to transform a contingency table (A x B) into a data 
frame while keeping the cross-tabulation structure (i.e. rows = 
levels of A, columns = levels of B). I have tried as.data.frame, 
xtabs, etc... and always got a "flattened" list of 3 variables (A, B, 
Freq).
How to do that?
Thanks in advance
Charles Raux




More information about the R-help mailing list