[R] omit empty cells in crosstab?

sjaffe sjaffe at riskspan.com
Fri Apr 24 20:19:45 CEST 2009


Perhaps this is a common question but I haven't been able to find the answer.

I have data with many factors, each taking many values. However, only
relatively few combinations appear in the data, ie have nonzero counts, in
other words the resulting table is sparse. Say we have 10 factors each with
10 levels. The result of table() would exceed the memory space (on a 32bit
machine). Is there any way to produce a table with empty cells omitted?
(without first producing the whole table and then removing rows.)

Thanks,
Steve

-- 
View this message in context: http://www.nabble.com/omit-empty-cells-in-crosstab--tp23222263p23222263.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list