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

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.

See also

Author

Andrzej Galecki and Tomasz Burzykowski

Examples

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