buggy_count: A buggy version of plyr's count function

Description Usage Arguments Value Note See Also Examples

Description

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

Usage

1
  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.

Note

In case the “buggy” part of the name didn't give it away, this is not suitable for real world usage!

See Also

count and table

Examples

1
2
3
4
## Not run: 
buggy_count(factor()) #oops!

## End(Not run)

learningr documentation built on Oct. 2, 2019, 5:04 p.m.