我一直试图通过在Hmisc中请求功能之前添加乳胶(describe)或latex(xtable)来获得下表中的乳胶输出,但这不起作用。知道错误在哪里吗?
<<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 = '')
@
答案 0 :(得分:0)
尝试输出乳胶:
> 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.