Re: [R] Hmisc latex format.df by row formatting?

From: Dieter Menne <dieter.menne_at_menne-biomed.de>
Date: Thu 08 Dec 2005 - 20:59:55 EST

Dieter Menne <dieter.menne <at> menne-biomed.de> writes:

>
> Using Hmisc, I get the following output from format.df (which will feed to
> latex)
>
> Min Q1 Med Mean Q3 Max
> Age " 30" " 32.5" " 36" " 37.50" " 41.00" " 49"
> Height "174" "175.0" "178" "179.00" "181.00" "188"
> Weight " 68" " 74.0" " 78" " 76.67" " 79.75" " 83"
>
> Automatic decimal points adjustments does not exactly do what I want in this
> case. It would be nice to have the same number of decimals row-wise.

Try something like:

     xt = t(format.df(t(as.matrix(xt))))

Dieter



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Dec 08 21:15:51 2005

This archive was generated by hypermail 2.1.8 : Thu 08 Dec 2005 - 23:37:18 EST