learningr (version 0.29.1)

buggy_count: A buggy version of plyr's count function

Description

An old version of the plyr package's count function that fails when you pass it a factor input.

Usage

buggy_count(df, vars = NULL, wt_var = NULL)

Arguments

df

A data frame or an atomic input.

vars

Variables in df to count unique values of

wt_var

Optional variable to weight by. See count.

Value

A data frame with label and freq columns.

See Also

count and table

Examples

Run this code
# NOT RUN {
buggy_count(factor()) #oops!
# }

Run the code above in your browser using DataLab