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.

CountCompCases(x)

# S3 method for CountCompCases
print(x, digits=1, ...)

Arguments

x

a data.frame containg the data.

digits

the number of digits to be used when printing the results.

...

the dots are not further used.

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.

Author

Andri Signorell <andri@signorell.net>

Examples

CountCompCases(d.pizza)
#> 
#> Total rows:      1209
#> Complete Cases:  917 (75.8%)
#> 
#>              vname  nas  nas_p  cifnot  cifnot_p
#> 1            index    0   0.0%     917     75.8%
#> 2             date   32   2.6%     917     75.8%
#> 3             week   32   2.6%     917     75.8%
#> 4          weekday   32   2.6%     917     75.8%
#> 5             area   10   0.8%     925     76.5%
#> 6            count   12   1.0%     917     75.8%
#> 7           rabate   12   1.0%     917     75.8%
#> 8            price   12   1.0%     917     75.8%
#> 9         operator    8   0.7%     924     76.4%
#> 10          driver    5   0.4%     920     76.1%
#> 11    delivery_min    0   0.0%     917     75.8%
#> 12     temperature   39   3.2%     947     78.3%
#> 13    wine_ordered   12   1.0%     917     75.8%
#> 14  wine_delivered   12   1.0%     917     75.8%
#> 15      wrongpizza    4   0.3%     921     76.2%
#> 16         quality  201  16.6%    1103     91.2%
#>