Description Usage Arguments Value
View source: R/merge_small_factor_levels.R
given an input factor/character vector,
merges together all vector levels that account for
less than min.perc
of the total number of
elements in the vector
1 2 3 4 5 6 | merge_small_factor_levels(
x,
min.perc = 0.01,
case_weights = NULL,
good_levels = T
)
|
x |
either character of factor vector |
min.perc |
minimum frequency of non NA values for a factor level not to be merged |
case_weights |
case weights used in calculation of level frequency |
good_levels |
should syntactically valid levels be required? |
factor vector, with small levels merged
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.