powered by
This adapts code from R base summary.factor. It adds the calculation of entropy as a measure of diversity.
summary.factor(y)
a factor (non-numeric variable)
A list, including the summary table and vector of summary stats if requested.