[R] latex on summary.formula from Hmisc doesn't remove N

Thijs Muizelaar thijs.muizelaar at xs4all.nl
Sun Oct 31 21:10:41 CET 2010


Hi All,

I'm trying to get a summary table of my datasets, in which I want the 
mean of different groups calculated and presented in a table. I want 
this table to easily be exported to LaTeX. However, I'm not able to 
remove the N in this summary table. It gives the following error:
"Error in 1:lt : argument of length 0"

What have I tried:
 > tmp<-summary.formula(traveltime ~ guidanceID + gender, data=event2, 
fun=mean, method='cross', prn=FALSE)

 > latex(tmp, file="", title="",cdec=0, prn = FALSE, booktabs=TRUE)
Error in 1:lt : argument of length 0

Without "prn = FALSE" or with "prn = TRUE", the latex function works, 
but gives the unwanted result with the number of values. Using:
 > print(tmp, prn=FALSE)
gives the proper table, but this cannot be convert to a LaTeX table.

Am I doing something wrong here? Or is it a bug in Hmisc?

Any ideas?

Thijs



More information about the R-help mailing list