Learn R Programming

nlmeU (version 0.70-9)

missPat: Extract pattern of missing data

Description

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

Usage

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

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.

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.

Author

Andrzej Galecki and Tomasz Burzykowski

Examples

Run this code
dtf <- subset(armd.wide,
             select = c(visual12, visual24, visual52))
missPat(dtf, symbols = c("?","+"))

Run the code above in your browser using DataLab