Message-ID: <1078084107.7704.32.camel@localhost.localdomain>
Date: 2004-02-29T19:48:27Z
From: Marc Schwartz
Subject: Proportions again
In-Reply-To: <20040229184054.7BD273958@mprdmxin.myway.com>
On Sun, 2004-02-29 at 12:40, Gabor Grothendieck wrote:
> Several people have alrady answered you by this time and
> in addition to their answers you might also be interested
> in CrossTable in package gregmisc.
Gabor,
Thanks for pointing out CrossTable().
Just as a quick heads up/clarification for Carlos, CrossTable() is
designed to cross-tabulate two vectors and generate counts,
row/column/table proportions and other results from the 2 dimensional
cross-tab in a (hopefully) nicely formatted fashion.
It is not presently designed to handle generating proportions from the
tabulation of a single vector with repeating values (such as Carlos'
example) and will generate an error message if a single vector is
passed.
In that scenario, as many folks have already recommended, the
combination of table() and prop.table() would be preferred.
HTH,
Marc Schwartz