Re: [R] Hmisc summary.formula formats for binary and continuous variables

2011-03-27 Thread Frank Harrell
If by 35 (10%) you mean that 35 is the numerator, this is not such a good idea. That's because it emphasizes something that is not a scientific quantity. A scientific quantity is something that has a meaning outside the current sample. The numerator is dependent on the denominator. Regarding th

Re: [R] Hmisc summary.formula formats for binary and continuous variables

2011-03-27 Thread Joshua Wiley
I played around with this for awhile and did not get very far. I did not see any arguments in summary.formula or its print methods to reorder (happy to be corrected). Another approach I toyed with was to create a custom function to pass to summary.formula() that would itself create (something lik

[R] Hmisc summary.formula formats for binary and continuous variables

2011-03-27 Thread Kwok, Heemun
Hello, I am using Hmisc summary.formula, latex and Sweave to produce tables for publication. Is it possible to change the formats for binary and continuous variables? I would prefer to show 35 (10%) and 1.5 (1.2-1.8) rather than 10% (35) and 1.2 / 1.5 / 1.8. Here is a simple example: sex <-