powered by
This function allows to compactly present pattern of missing data in a given vector/matrix/data frame or combination of thereof.
missPat(..., symbols = c("X", "-"), collapse = "", missData = FALSE)
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
...{}
cnames
contains names of vectors/columns/variables. Optional attribute missData contains data frame with missing pattern.
missData
one or more vectors/matrices/data frames. They need to be compatible for columnwise binding.
vector containing two single characters used to indicate NA and remaining values. By defualt it has values: X and -.
X
-
an optional character string. It is used in the internal call paste() function to separate the results. Rarely used. By default set to NULL
paste()
logical. If TRUE data frame with pattern of missing values is saved in missData attribute of the vector returned by this function.
TRUE
Andrzej Galecki and Tomasz Burzykowski
dtf <- subset(armd.wide, select = c(visual12, visual24, visual52)) missPat(dtf, symbols = c("?","+"))
Run the code above in your browser using DataLab