Learn R Programming

naniar (version 0.3.1)

label_shadow_matrix: Give NAs a more meaningful label

Description

Returns a binary factor of !NA and NA, where !NA indicates a datum that is not missing, and NA indicates missingness. This function is what powers the factor levels in as_shadow().

Usage

label_shadow_matrix(x)

Arguments

x

a vector

Value

a vector of factors containing the labels "!NA" for Not missing and "NA" for missing.

See Also

as_shadow

Examples

Run this code
# NOT RUN {
label_shadow_matrix(airquality$Ozone)
# }

Run the code above in your browser using DataLab