miss_ind {nima}R Documentation

Add missingness indicators to existing data object

Description

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

Usage

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)

[Package nima version 0.6.2 Index]