powered by
Substitute missing data with a string or factor level.
explicit_na(x, label = "")
x with any NA values substituted by label.
x
NA
label
(factor or character) values for which any missing values should be substituted.
factor
character
(string) string that missing data should be replaced with.
string
explicit_na(c(NA, "a", "b")) is.na(explicit_na(c(NA, "a", "b"))) explicit_na(factor(c(NA, "a", "b"))) is.na(explicit_na(factor(c(NA, "a", "b")))) explicit_na(sas_na(c("a", "")))
Run the code above in your browser using DataLab