Description Usage Arguments Value Author(s) Examples
View source: R/fixCatProportions.R
Corrects low proportions levels by investigating the proportion of data allocated to each level and replacing the level by a one called "_ALL_OTHER_" if the level is below the minimum percentage threshold
1 2 | fixCatProportions(x, catFeats, minLevelPercentage = 0.025,
autoCode = TRUE)
|
x |
[data.frame | Required] Data.frame containing categorical features |
catFeats |
[character vector | Required] Character vector of categorical features |
minLevelPercentage |
[numeric | Optional] Used to identify low proportional categorical levels. Default of 0.025 |
autoCode |
[logical | Optional] Should code be generated when running the function |
List containing a data.frame with and a code list if autoCode is set to TRUE
Xander Horn
1 | new <- fixCatProportions(x = iris, catFeats = "Species") # Proportions are all at 0.33 thus no change will occur
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.