Learn R Programming

rockchalk (version 1.8.157)

summary.factor: Tabulates observed values and calculates entropy

Description

This adapts code from R base summary.factor. It adds the calculation of entropy as a measure of diversity.

Usage

# S3 method for factor
summary(y)

Value

A list, including the summary table and vector of summary stats if requested.

Arguments

y

a factor (non-numeric variable)

Author

Paul E. Johnson pauljohn@ku.edu