Description Usage Arguments Value Examples
Replaces blank factor values with "NA". Recreates factor variable with new level.
1 | set.missing.factors.to.NA(data, variables, logging = FALSE)
|
data |
data frame with variables of interest |
variables |
vector of factors |
logging |
flag to write detailed stats in standard output (default=FALSE) |
data frame with replaced missing values for selected variables
1 | set.missing.factors.to.NA(df, c('var1','var2','var3'), logging=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.