Learn R Programming

nlmeU (version 0.71.7)

missPat: 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)

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.

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.

Author

Andrzej Galecki and Tomasz Burzykowski

See Also

armd.wide

Examples

Run this code
if (FALSE) {
  data(armd.wide, package = "nlmeU")
  dtf <- armd.wide[ , c("visual12", "visual24", "visual52")]
  missPat(dtf, symbols = c("?", "+"))
}

Run the code above in your browser using DataLab