Substitute missing data with a string or factor level.
Usageexplicit_na(x, label = "<Missing>")
Arguments
(factor
or character
)
values for which any missing values should be substituted.
(string
)
string that missing data should be replaced with.
x
with any NA
values substituted by label
.
explicit_na(c(NA, "a", "b"))
#> [1] "<Missing>" "a" "b"
is.na(explicit_na(c(NA, "a", "b")))
#> [1] FALSE FALSE FALSE
explicit_na(factor(c(NA, "a", "b")))
#> [1] <Missing> a b
#> Levels: a b <Missing>
is.na(explicit_na(factor(c(NA, "a", "b"))))
#> [1] FALSE FALSE FALSE
explicit_na(sas_na(c("a", "")))
#> [1] "a" "<Missing>"
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4