This array is useful for extracting the subset of complete
cases. The function cci(x) is equivelant to
complete.cases(x). Missing values in x are
coded as NA. The companion function for selecting
the incomplete cases is ici().
Usage
cci(x)
Arguments
x
An R object. Currently supported are
methods for the following classes: mids,
data.frame and matrix. In addition,
x can be a vector of any kind.
Value
Logical vector indicating the complete cases, . If x
is a data.frame or matrix the length is
nrow(x). In other cases, the length is
length(x).
cci(nhanes) # indicator for 13 complete cases f <- cci(nhanes[,c("bmi","hyp")]) # complete data for bmi and hyp nhanes[f,] # obtain all data from those with complete bmi and hyp