[R] advanced tabulation
Frank E Harrell Jr
fharrell at virginia.edu
Mon Dec 2 13:03:05 CET 2002
On Mon, 2 Dec 2002 08:51:09 +0100
Christian Schulz <ozric at web.de> wrote:
> i make me thoughts about a "advanced tabulation" package similar to
> commercial software products like Quantum or Wincross.
>
> Before i'm beginning to fight with coding - is in the mailing-List anybody
> doing something similar in the past and have a good starting point
> and/or suggestions for me ?
>
> My purpose ist to define for a dataset headers (i.e. sex,age-groupes..)
> which should write in the colums of a landscape table and percentage all
> other
> variables ( rows) dependence to the header category !?
>
> P.S. The first attempts sure more easy than
> the possibilities in wincross .......
>
> http://www.skim.nl/software/images/WC-banners.gif
> http://www.skim.nl/software/images/WC-tables.gif
>
> many thanks for advance & regards,
> Christian
>
summary(columnvariable ~ rowvar1+rowvar2+...., method='reverse') will do what you want, if you are interested in separate summaries for each row variable. This uses the summary.formula function in the Hmisc library (http://hesweb1.med.virginia.edu/biostat/s/Hmisc.html) for which there are plot, print, and latex methods for formatting the output. For 2-way cross-classified summaries see method='cross'.
--
Frank E Harrell Jr Prof. of Biostatistics & Statistics
Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences
U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat
More information about the R-help
mailing list