miss_ind: Add missingness indicators to existing data object

Description Usage Arguments Value Examples

View source: R/missing_ind.R

Description

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

Usage

1
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

1
2
3
4
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)

nima documentation built on May 21, 2018, 5:03 p.m.

Related to miss_ind in nima...