freq.na: Generate frequency table of missing values.

Description Usage Arguments Value See Also Examples

View source: R/tables.R

Description

Generate a frequency table of missing values as raw counts and percentages.

Usage

1

Arguments

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.

Value

The result is an object of class data.frame.

See Also

table, is.na

Examples

1
2
3
4
5
6
7
8
9
data(hdv2003)
## Examine a single vector.
freq.na(hdv2003$qualif)
## Examine a data frame.
freq.na(hdv2003)
## Examine several variables.
freq.na(hdv2003, "nivetud", "trav.satisf")
## To see only variables with the most number of missing values
head(freq.na(hdv2003))

Example output

missing       % 
    347      17 
              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
            missing  %
trav.satisf     952 48
nivetud         112  6
            missing  %
trav.imp        952 48
trav.satisf     952 48
qualif          347 17
nivetud         112  6
heures.tv         5  0
id                0  0

questionr documentation built on Nov. 30, 2020, 5:08 p.m.