[R] crosstab for n-way contingency tables

From: Isotta Felli <isotta_felli_at_yahoo.com>
Date: Wed 31 Aug 2005 - 05:28:26 EST

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 category (soprano,mezzo-soprano, ...) , voice type( drammatic, spinto, lirico-spinto, lirico, leggero), school (german, italian, french, russian, anglo-saxon, other);repertory (opera, Lieder, oratorio, operetta) continuous variate: age  

I would like to tabulate the frequencies (relative percentages) say in the following way columns: school repertory
rows : voice category voice type  

or to output in the cells of the above table, the statistics (mean/median/quantiles) for age    

I've seen that the function bwplot(age~school | repertory, data= singers, layout=c(4,2)) would do graphically something similar to what I want, but I desire the output also in tabular form  



        [[alternative HTML version deleted]]

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 Wed Aug 31 05:42:29 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:00 EST