Skip to content

stat.table object into latex

3 messages · Lauri Nikkinen, albert sanchez niubo, Martyn Plummer

#
R users,

Is there a way to convert stat.table (library(Epi)) object into latex
table? I have tried xtable from (xtable package) and latex (Hmisc
package) with no success.

Example code:

install.packages("Epi")
library(Epi)
install.packages("Hmisc")
library(Hmisc)
install.packages("xtable")
library(xtable)

a <- stat.table(index=list(wool,tension),
                contents=list(count(),mean(breaks),percent (wool)),
                data=warpbreaks)
a
a.latex <- xtable(a)
Error in UseMethod("xtable") : no applicable method for "xtable"
a.latex <- latex(a)
Error in x[, j] : incorrect number of dimensions

Best,
Lauri
#
I haven't thought about this before, but you are quite right: there
should be an xtable method for stat.table objects. I will make one
and hopefully this will be in the next release of Epi.

Martyn

Quoting albert sanchez niubo <albynew at hotmail.com>:
-----------------------------------------------------------------------
This message and its attachments are strictly confidenti...{{dropped:8}}