Description Usage Arguments Value
Groups minority classes as others or replaces them with the modal class
1 | replace_charvars(df, col, option = "other", cutoff = 0.05)
|
df |
The data frame on which variable transformation is to be performed |
col |
Variable names on which the transformation is to be performed |
option |
Specify other to group classes with frequency less than the cutoff as other or specify rep_max to replace minority classes with modal class |
cutoff |
Classes with frequency less than the cutoff will be modified. Default is 5 percent |
Output is the data set with transformed variables
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.