[R] latex of ftable (Hmisc?)
Dieter Menne
dieter.menne at menne-biomed.de
Sat Jun 23 10:44:58 CEST 2007
Dear latexRs,
I tried to make a latex printout of a simple categorial ftable. It should
look like the output of print.ftable. Any ideas how to get the syntax of
summary.formula right. Or some alternative? As far I see, xtable does not
have method for ftable.
Dieter
library(Hmisc)
n=500
sex <- factor(sample(c("m","f"), n, rep=TRUE))
treatment <- factor(sample(c("Drug","Placebo"), n, rep=TRUE))
symptom <- factor(sample( c('H','S','G'), n,TRUE))
# I want this output in latex
ftable(symptom~treatment+sex)
# No, it's not the same
ss = summary(symptom~treatment+sex,fun=table)
latex(ss)
More information about the R-help
mailing list