Return for each variable of a data frame the number of missing values and the complete cases to be expected if this variable would be omitted.
Value
a list with three elements. The first gives the number of rows, the
second the number of complete cases for the whole data frame. The third
element tab contains the data for the single variables.
See also
pharos::plotMiss,
complete.cases(), is.na(), na.omit()
Other data.missing:
completeColumns()
Examples
countCompCases(airquality)
#> $n
#> [1] 153
#>
#> $cc
#> [1] 111
#>
#> $tab
#> vname nas nas_p cifnot cifnot_p
#> 1 Ozone 37 0.24183007 146 0.9542484
#> 2 Solar.R 7 0.04575163 116 0.7581699
#> 3 Wind 0 0.00000000 111 0.7254902
#> 4 Temp 0 0.00000000 111 0.7254902
#> 5 Month 0 0.00000000 111 0.7254902
#> 6 Day 0 0.00000000 111 0.7254902
#>
#> attr(,"class")
#> [1] "CountCompCases"
