Rdocumentation
powered by
Learn R Programming
SciencesPo (version 1.3.7)
smallAsMissing: Recode very small levels into Missing values
Description
The function recodes all levels with proportions below a certain threshold into "Missing". This is useful for a very crude first look at a lot of variables.
Usage
smallAsMissing(variables, threshold = 0.05, new.level = "Missing")
Arguments
variables
is a data.frame of factors
threshold
is the proportion below which a level is recoded
new.level
is the new label for the recoded levels
Value
A data.frame