Add indicator columns to a data.frame showing the pattern of missingness.

miss_ind(data, prefix = "miss_")

Arguments

data

A numeric vector or array.

prefix

A string used to name the indicator variables..

Value

An augmented data.frame with indicators for missingness patterns.

Examples

data <- data.frame(cbind(rnorm(10), runif(10))) data[sample(nrow(data), 3), 1] <- NA data[sample(nrow(data), 4), 2] <- NA data <- miss_ind(data) #