View source: R/convert_level_to_na.R
| convert_level_to_na | R Documentation |
"NA" values to NA for categorical variablesConvert "NA" values to NA for categorical variables
convert_level_to_na(data)
data |
A data frame or tibble |
A data frame or tibble with "NA" converted to NA
data <- data.frame(
x1 = c(1, 2, NA),
x2 = c("1", "2", "NA"),
x3 = factor(c("1", "2", "NA")),
x4 = factor(c("b", "NA", "a"), ordered = TRUE)
)
convert_level_to_na(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.