Learn R Programming

mice (version 2.7)

ccn: Number of (in)complete cases

Description

Calculates the number of (in)complete cases

Usage

## S3 method for class 'data.frame':
ccn(x)
## S3 method for class 'matrix':
ccn(x)
## S3 method for class 'mids':
ccn(x)
## S3 method for class 'data.frame':
icn(x)
## S3 method for class 'matrix':
icn(x)
## S3 method for class 'mids':
icn(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

  • An integer with the number of elements in x with (in)complete data.

See Also

cc, ic, code{cci}, code{link{ici}}

Examples

Run this code
ccn(nhanes) # 13 complete cases 
  icn(nhanes) # the remaining 12 rows 
  icn(nhanes[,c("bmi","hyp")]) # number of cases with incomplete bmi and hyp

Run the code above in your browser using DataLab