| expand_na | R Documentation |
Add new variables that indicate if a value is "missing" or "not missing" for original variables that contain NA
expand_na(
data,
types = c("chr", "dbl", "fct", "lgl", "int", "ord"),
skip_vars = NULL
)
data |
A data frame |
types |
A vector of variables types to expand |
skip_vars |
A character vector of variables that shouldn't be expanded |
An augmented data frame with the original variables and new variables that contain the missingness patterns of variables with NA
expand_na(data = example_na, type = c("dbl", "int"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.