Learn R Programming

naniar (version 0.6.0)

unbinders: Unbind (remove) shadow from data, and vice versa

Description

Remove the shadow variables (which end in _NA) from the data, or vice versa. This will also remove the nabular class from the data.

Usage

unbind_shadow(data)

unbind_data(data)

Arguments

data

data.frame containing shadow columns (created by bind_shadow())

Value

data.frame without shadow columns if using unbind_shadow(), or without the original data, if using unbind_data().

Examples

Run this code
# NOT RUN {
# bind shadow columns
aq_sh <- bind_shadow(airquality)

# print data
aq_sh

# remove shadow columns
unbind_shadow(aq_sh)

# remove data
unbind_data(aq_sh)

# errors when you don't use data with shadows
# }
# NOT RUN {
 unbind_data(airquality)
 unbind_shadow(airquality)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab