【问题标题】:latex table from describe function in Hmisc来自 Hmisc 中描述函数的乳胶表
【发布时间】:2014-09-23 17:03:27
【问题描述】:

我一直在尝试通过在 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 = '')
@

【问题讨论】:

    标签: r latex hmisc describe


    【解决方案1】:

    试试这个输出乳胶:

    > 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-11-19
      • 1970-01-01
      • 2014-01-18
      • 1970-01-01
      • 1970-01-01
      • 2013-03-18
      • 1970-01-01
      • 2017-05-26
      • 1970-01-01
      相关资源
      最近更新 更多