[R] summary in Hmisc and Latex

moleps moleps2 at gmail.com
Tue Aug 31 19:42:48 CEST 2010


Dear all,

With the latest update of Hmisc I no longer have any problems with latex. However using the ctable option produces latex code that at least on both the miktex distribution at work and mactex distribution at home refuses to run due to an extra blank line inserted between the multicolumn lines in the latex code... It runs fine if the line is deleted or if the ctable option is left out.  Does this apply to other people as well?

Regards,
//M





library(Hmisc)

options(digits=3)
set.seed(173)
sex<- factor(sample(c("m","f"), 500, rep=TRUE))
age<- rnorm(500, 50, 5)
treatment<- factor(sample(c("Drug","Placebo"), 500, rep=TRUE))
symp<- c('Headache','Stomach Ache','Hangnail',
         'Muscle Ache','Depressed')
symptom1<- sample(symp, 500,TRUE)
symptom2<- sample(symp, 500,TRUE)
symptom3<- sample(symp, 500,TRUE)
Symptoms<- mChoice(symptom1, symptom2, symptom3, label='Primary Symptoms')
table (Symptoms)
table(symptom1,symptom2)
f<- summary(treatment ~ age + sex + Symptoms, method="reverse", test=TRUE)
latex(f,file="")
latex(f,file="",ctable=T)


More information about the R-help mailing list