[R] Formatting an anova table using latex

Dieter Menne dieter.menne at menne-biomed.de
Tue Mar 14 08:31:30 CET 2006


Michael Kubovy <kubovy <at> virginia.edu> writes:

> 
> 
> Unfortunately this doesn't work.
> 
> rowname = NULL
> 
> suppresses row names altogether. I want to substitute different row  
> names ....
> 

This example works for me. Take into account that rownamesTexCmd adds
the leading \, so you cannot use it to add visible text.

Dieter

-------
library(nlme)
library(Hmisc)

fm1 <- lme(distance ~ age, Orthodont, random = ~ age | Subject)
fm2 <- update(fm1, random = pdDiag(~age))
an = anova(fm1, fm2)


latex(an, file ="",#'raw1.tex',
rownamesTexCmd = c("bfseries", "textit" ),
rowname = c('baR', 'addit' ),
longtable = F,
dcolumn= T, booktabs = T, table.env = F, colheads = NULL,
colnamesTexCmd = c
('', 'df', 'aic', 'bic', 'logl', 'chisq', 'chisqdf', 'prchisq'))




More information about the R-help mailing list