[R] crosstab for n-way contingency tables

2005-08-30 Thread Isotta Felli
Dear list. New to R, I'm looking for a way of using crosstab to output low-dimensional (higher than 2) contingency tables (frequencies, per-cents by rows, % by columns, mean, quantiles) I'm looking for something of the following sort dataframe: singers, categorical variates: voice

Re: [R] crosstab for n-way contingency tables

2005-08-30 Thread Marc Schwartz (via MN)
On Tue, 2005-08-30 at 12:28 -0700, Isotta Felli wrote: Dear list. New to R, I'm looking for a way of using crosstab to output low-dimensional (higher than 2) contingency tables (frequencies, per-cents by rows, % by columns, mean, quantiles) I'm looking for something of the following

Re: [R] crosstab for n-way contingency tables

2005-08-30 Thread hadley wickham
Hi Isotta, You can do this with the reshape package (available from CRAN). eg install.packages(reshape) library(reshape) data(singer, package=lattice) singer$type - c(drammatic, spinto, lirico-spinto, lirico, leggero)[sample(1:5, 235, replace=T)] singer$school - c(german, italian, french,