Skip to content
Prev 167847 / 398502 Next

Frequency and summary statistics table with different variables and categories

You should look at how summary.data.frame does it. (You are, of  
course, re-inventing the wheel.)

You probably ought to also look at the doBy package with its summaryBy  
function. The help page example uses the length function for counts.

I often prefer the output of describe() in Hmisc.