0

我一直在尝试通过在 Hmisc 中的请求功能之前添加 latex(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 = '')
@
4

1 回答 1

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.
于 2014-09-23T17:31:44.850 回答