Re: [R] Exporting Contingency Tables with xtable

2009-12-09 Thread Na'im R. Tyson
Gabor, Thanks for the advice. Using the 'rowlabel' switch works, but when used with the 'collabel' switch, I received the following error in Latex 2e: ! LaTeX Error: Illegal character in array arg. The line that LaTeX has issue with is: \multicolumn{1}{observed}{uh}& The entire table lo

Re: [R] Exporting Contingency Tables with xtable

2009-12-09 Thread Gabor Grothendieck
Try the latex function in the Hmisc package. Using the state.* variables built into R for sake of example: library(Hmisc) latex(table(state.division, state.region), rowlabel = "X", collabel = "Y", file = "") On Wed, Dec 9, 2009 at 12:04 AM, Na'im R. Tyson wrote: > Dear R-philes: > > I am havi

[R] Exporting Contingency Tables with xtable

2009-12-08 Thread Na'im R. Tyson
Dear R-philes: I am having an issue with exporting contingency tables with xtable(). I set up a contingency and convert it to a matrix for passing to xtable() as shown below. v.cont.table <- table(v_lda$class, grps, dnn=c("predicted", "observed")) v.cont.mat <- as.matrix(v.cont.tab