John Maindonald <john.maindonald <at> anu.edu.au> writes: : I often want to use xtable() with tables. There is no method : defined for the class "table". After a bit of rummaging, I found : that I can use: : xtable(as(tab, "matrix")).
That's probably ok for most practical purposes but it will not preserve the table's dnn, if it has one: R> tab <- table(1:3, dnn = "A") R> tab # dnn present A 1 2 3 1 1 1 R> as.matrix(tab) # dnn gone [,1] 1 1 2 1 3 1 ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
