Skip to contents

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().

Usage

strip_tags(x)

Arguments

x

A numeric vector with tagged NAs.

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.

Examples

if (FALSE) { # \dontrun{
data <- read_spss("survey.sav")
# Remove tag information, keep only valid labels
clean <- strip_tags(data$satisfaction)
} # }