Description Usage Arguments Value Examples
Ideally only use this for categorical values - however there is no check or prevention against using it with numericals
1 2 3 | ezr.group_infreq(dataset, column, le_percent = 0.05,
newname = "__infreq__", change_single = FALSE, convert_na = TRUE,
factorize_new_column = TRUE)
|
dataset |
Dataset |
column |
The column you are interested in re-grouping the infrequent values of. |
le_percent |
The <= percent used to change values to <newname> |
newname |
What it should be called. Defaults to '__infreq__' |
change_single |
If there are just two values in a column, should anything be changed? Default is no. |
convert_na |
Should NA values be converted to factors? Default is TRUE. |
factorize_new_column |
Convert the new column to factors? default is true |
Returns the dataframe that was inputted with adjustments made, if needed
1 | newdata=ezr.group_infreq(diamonds, column = 'color', le_percent = 0.20)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.