Converts all tagged NAs to regular (untagged) NA values, effectively
removing the missing value type information. Works with data from any
format: read_spss(), read_por(), read_stata(), read_sas(), or
read_xpt().
Value
A numeric vector where all tagged NAs have been replaced with
regular NA. Value labels for missing types are removed; labels for
valid values are preserved.
See also
read_spss(), read_stata(), read_sas(), read_xpt(),
na_frequencies(), untag_na()
Other data-import:
na_frequencies(),
read_por(),
read_sas(),
read_spss(),
read_stata(),
read_xlsx(),
read_xpt(),
untag_na()
Examples
# \donttest{
if (requireNamespace("haven", quietly = TRUE)) {
x <- set_na(c(1, 2, -9, 3, -8), -9, -8)
# Remove tag information: all missings become plain NA
strip_tags(x)
}
#> [1] 1 2 NA 3 NA
# }
