cc {mice}R Documentation

Complete cases

Description

Extracting complete cases is also known as 'listwise deletion' or 'complete case analyses'. cc(x) is equivalent to na.omit(x). Missing values in x are coded as NA. The companion function for selecting the incomplete cases is ic().

Usage

cc(x, drop = TRUE)

Arguments

x

An R object. Currently supported are methods for the following classes: mids, mira, mipo, data.frame and matrix. In addition, x can be a vector of any kind.

drop

A logical flag for matrices and arrays. If drop=TRUE the result is coerced to the lowest possible dimension.

Value

A vector, matrix of data.frame containing the data of the complete cases.

Author(s)

Stef van Buuren, 2010.

See Also

na.omit, ic, cci, ici, ccn, icn

Examples

cc(nhanes)   # get the 13 complete cases
cc(nhanes[,2,drop=FALSE], drop=FALSE) # extract complete bmi as column

[Package mice version 2.22 Index]