Generate a frequency table of missing values as raw counts and percentages.
freq.na(data, ...)either a vector or a data frame object
if x is a data frame, the names of the variables to examine or keywords to search for such variables. See lookfor for more details.
The result is an object of class data.frame.
data(hdv2003)
## Examine a single vector.
freq.na(hdv2003$qualif)
#> missing       % 
#>     347      17 
## Examine a data frame.
freq.na(hdv2003)
#>               missing  %
#> trav.imp          952 48
#> trav.satisf       952 48
#> qualif            347 17
#> nivetud           112  6
#> heures.tv           5  0
#> id                  0  0
#> age                 0  0
#> sexe                0  0
#> poids               0  0
#> occup               0  0
#> freres.soeurs       0  0
#> clso                0  0
#> relig               0  0
#> hard.rock           0  0
#> lecture.bd          0  0
#> peche.chasse        0  0
#> cuisine             0  0
#> bricol              0  0
#> cinema              0  0
#> sport               0  0
## Examine several variables.
freq.na(hdv2003, "nivetud", "trav.satisf")
#>             missing  %
#> trav.satisf     952 48
#> nivetud         112  6
## To see only variables with the most number of missing values
head(freq.na(hdv2003))
#>             missing  %
#> trav.imp        952 48
#> trav.satisf     952 48
#> qualif          347 17
#> nivetud         112  6
#> heures.tv         5  0
#> id                0  0