[R] Formatting an anova table using latex

Michael Kubovy kubovy at virginia.edu
Mon Mar 13 17:13:27 CET 2006


Hi r-helpers,

When I issue the command

latex(anova(raw1.lmer0, raw1.lmer, raw1.lmerI), file = 'raw1.tex',  
rownamesTexCmd = c('baR', 'addit', 'multip'), longtable = F, dcolumn  
= T, booktabs = T, t able.env = F, colheads = NULL, colnamesTexCmd = c 
('', 'df', 'aic', 'bic', 'logl', 'chisq', 'chisqdf', 'prchisq'))

I get:

% latex.default(anova(raw1.lmer0, raw1.lmer, raw1.lmerI), file =  
"raw1.tex",      rownamesTexCmd = c("baR", "addit", "multip"),  
longtable = F,      dcolumn = T, booktabs = T, table.env = F,  
rowheads = NULL,      colheads = NULL, colnamesTexCmd = c("", "df",  
"aic", "bic",          "logl", "chisq", "chisqdf", "prchisq"))
%
\newcolumntype{.}{D{.}{.}{-1}}
\begin{center}
\begin{tabular}{l.......}\toprule
\multicolumn{1}{l}{\ }&
\multicolumn{1}{c}{\df }&
\multicolumn{1}{c}{\aic }&
\multicolumn{1}{c}{\bic }&
\multicolumn{1}{c}{\logl }&
\multicolumn{1}{c}{\chisq }&
\multicolumn{1}{c}{\chisqdf }&
\multicolumn{1}{c}{\prchisq }
\\ \midrule
\baR   raw1.lmer0 &    4 &    434 &    446 &    -213 &     &     &    \\
\addit   raw1.lmer &    5 &    436 &    451 &    -213 &    0.021 &     
~1 &    0.89\\
\multip   raw1.lmerI &    6 &    438 &    456 &    -213 &    0.114  
&    ~1 &    0.74\\
\bottomrule
\end{tabular}

\end{center}

Can you tell me how to suppress 'raw1.lmer0', 'raw1.lmer', and  
'raw1.lmerI' in the first column?



_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS:     P.O.Box 400400    Charlottesville, VA 22904-4400
Parcels:    Room 102        Gilmer Hall
         McCormick Road    Charlottesville, VA 22903
Office:    B011    +1-434-982-4729
Lab:        B019    +1-434-982-4751
Fax:        +1-434-982-4766
WWW:    http://www.people.virginia.edu/~mk9y/




More information about the R-help mailing list