| sas_na | R Documentation |
NASAS imports missing data as empty strings or strings with whitespaces only. This helper function can be used to
convert these values to NAs.
sas_na(x, empty = TRUE, whitespaces = TRUE)
x |
( |
empty |
( |
whitespaces |
( |
x with "" and/or whitespace-only values substituted by NA, depending on the values of
empty and whitespaces.
sas_na(c("1", "", " ", " ", "b"))
sas_na(factor(c("", " ", "b")))
is.na(sas_na(c("1", "", " ", " ", "b")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.