Dear List: 
After reading some of the e-mails related to this topic I found one that 
converts a ftable to latex nicely.

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)
 ss = summary(symptom~treatment+sex,fun=table)
 latex(ss)

But the next example gets rid off the rownames and column names after creating 
the latex table.
x <- ftable(Titanic, row.vars = 1:2, col.vars = "Survived")
latex(x)





Felipe D. Carrillo  
Supervisory Fishery Biologist  
Department of the Interior  
US Fish & Wildlife Service  
California, USA

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to