0

I've been trying to get a latex output for the table below by adding latex(describe) or latex(xtable) before the requested fuction in Hmisc but that does not work. Any idea of where the error is?

<<echo=FALSE, message=FALSE>>=
library(Hmisc)
library(MMST)
require(xtable)
data(wine)
attach(wine)
@  

<<echo=TRUE, message=TRUE>>=
describe(wine[c("Alcohol", "MalicAcid", "Ash", "AlcAsh", 
"Mg", "Phenols", "Flav", "NonFlavPhenols","Proa" ,"Color","Hue","OD", "Proline",
"classdigit", "class")], descript='Descriptive Statistics', file = '')
@
Thomas
  • 43,637
  • 12
  • 109
  • 140
yojan2001
  • 21
  • 3

1 Answers1

0

Try this to output latex:

> d <- describe(head(wine), descript = "Descriptive Statistics")
> latex(d, file = '')
\begin{spacing}{0.7}
\begin{center}\textbf{ Descriptive Statistics \\ 15 Variables~~~~~ 6 ~Observations}\end{center}
\smallskip\hrule\smallskip{\small
\vbox{\noindent\textbf{Alcohol}
etc.
G. Grothendieck
  • 254,981
  • 17
  • 203
  • 341