Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

cc

Select complete cases


Description

Extracts the complete cases, also known as listwise deletion. cc(x) is similar to na.omit(x), but returns an object of the same class as the input data. Dimensions are not dropped. For extracting incomplete cases, use ici.

Usage

cc(x)

Arguments

x

An R object. Methods are available for classes mids, data.frame and matrix. Also, x could be a vector.

Value

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

Author(s)

Stef van Buuren, 2017.

See Also

Examples

# cc(nhanes)   # get the 13 complete cases
# cc(nhanes$bmi) # extract complete bmi

mice

Multivariate Imputation by Chained Equations

v3.13.0
GPL-2 | GPL-3
Authors
Stef van Buuren [aut, cre], Karin Groothuis-Oudshoorn [aut], Gerko Vink [ctb], Rianne Schouten [ctb], Alexander Robitzsch [ctb], Patrick Rockenschaub [ctb], Lisa Doove [ctb], Shahab Jolani [ctb], Margarita Moreno-Betancur [ctb], Ian White [ctb], Philipp Gaffert [ctb], Florian Meinfelder [ctb], Bernie Gray [ctb], Vincent Arel-Bundock [ctb]
Initial release
2021-01-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.