missPat: Extract pattern of missing data

View source: R/varia.R

missPatR Documentation

Extract pattern of missing data

Description

This function compactly presents the pattern of missing data in a given vector, matrix, or data frame.

Usage

missPat(..., symbols = c("X", "-"), collapse = "", missData = FALSE)

Arguments

...

one or more vectors, matrices, or data frames, compatible for column-wise binding.

symbols

vector containing two single characters used to indicate NA and non-NA values. By default, c("X", "-").

collapse

an optional character string used in the internal call to paste() to separate results. By default, "".

missData

logical. If TRUE, a data frame with the pattern of missing values is saved in the missData attribute of the returned vector. By default, FALSE.

Value

Character vector with as many elements as the length of vector(s) or number of rows in matrices/data frames in .... Attribute cnames contains names of vectors/columns/variables. Optional attribute missData contains a data frame with the missing pattern.

Author(s)

Andrzej Galecki and Tomasz Burzykowski

See Also

armd.wide

Examples

## Not run: 
  data(armd.wide, package = "nlmeU")
  dtf <- armd.wide[ , c("visual12", "visual24", "visual52")]
  missPat(dtf, symbols = c("?", "+"))

## End(Not run)

nlmeU documentation built on Aug. 25, 2025, 5:12 p.m.