cc {mice} | R Documentation |
Extracts complete and incomplete cases
## S4 method for signature 'data.frame' cc(x, drop = TRUE) ## S4 method for signature 'matrix' cc(x, drop = TRUE) ## S4 method for signature 'mids' cc(x, drop = TRUE) ## S4 method for signature 'data.frame' ic(x, drop = TRUE) ## S4 method for signature 'matrix' ic(x, drop = TRUE) ## S4 method for signature 'mids' ic(x, drop = TRUE)
x |
An |
drop |
A logical flag for matrices and arrays. If
|
This is the same as listwise deletion. cc()
is
equivalent to na.omit()
. Missing values in x
are coded
as NA.
A vector, matrix of data.frame containing the data of the
complete cases (cc
) or the incomplete cases (ic
).
Stef van Buuren, 2010.
na.omit
, cci
, ici
,
codeccn, codelinkicn
cc(nhanes) # get the 13 complete cases ic(nhanes) # get the 12 rows with incomplete cases ic(nhanes[1:10,]) # incomplete cases within the first ten rows ic(nhanes[,2:3]) # restrict extraction to variables bmi and hyp cc(nhanes[,2,drop=FALSE], drop=FALSE) # extract complete bmi as column