Skip to content
Prev 201678 / 398503 Next

as.data.frame.table() to convert by() output to a data frame

On Nov 25, 2009, at 4:11 PM, Michael Ash wrote:

            
If the by-object you get happens to be a 2d array, then why not.  
Tables are matrices after all.

 > tt <- table(c(1,1), c(1,1))
 > tt

     1
   1 2
 > is.matrix(tt)
[1] TRUE
David Winsemius, MD
Heritage Laboratories
West Hartford, CT