missPat: Extract pattern of missing data

Description Usage Arguments Value Author(s) Examples

Description

This function allows to compactly present pattern of missing data in a given vector/matrix/data frame or combination of thereof.

Usage

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

Arguments

...

one or more vectors/matrices/data frames. They need to be compatible for columnwise binding.

symbols

vector containing two single characters used to indicate NA and remaining values. By defualt it has values: X and -.

collapse

an optional character string. It is used in the internal call paste() function to separate the results. Rarely used. By default set to NULL

missData

logical. If TRUE data frame with pattern of missing values is saved in missData attribute of the vector returned by this function.

Value

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

Author(s)

Andrzej Galecki and Tomasz Burzykowski

Examples

1
2
3
dtf <- subset(armd.wide,
             select = c(visual12, visual24, visual52))
missPat(dtf, symbols = c("?","+"))

nlmeU documentation built on May 2, 2019, 6:50 p.m.