Create explicit factor level for missing values.
Missing values are converted to a factor level. This explicit assignment can reduce the chances that missing values are inadvertantly ignored. It also allows the presence of a missing to become a predictor in models.
An array of values, ideally either factor or character. Required
The factor label assigned to the missing value. Defaults to
Should a new factor level be created? (Specify
An array of values, where the
NA values are now a factor level, with the label specified by the
create_factor parameter is respected only if
scores isn't already a factor. Otherwise, levels without any values would be lost.
stop error will be thrown if the operation fails to convert all the
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.