fac_relevel: Auto releviling function for factors of count data

Description Usage Arguments Examples

View source: R/fac_relevel.R

Description

A helper function that turns a vector of count into factor data. If there are more than 5 levels in the factor, it aggregates those above the fifth level to a single level.

Usage

1
fac_relevel(x, min_levels = 6)

Arguments

x

a numeric or integer vector.

max_levels

offers the option to control the minimum numer of levels in the new factor

Examples

1
fac_relevel(testdata$extortions)

prestevez/victim documentation built on Jan. 30, 2020, 7:16 p.m.