Skip to contents

Returns a data frame of the data availability of each unit (row), as well as percentage of zeros. This function ignores any non-numeric columns, and returns a data availability table with non-numeric columns appended at the beginning.

Usage

# S3 method for class 'data.frame'
get_data_avail(x, ...)

Arguments

x

A data frame

...

arguments passed to or from other methods.

Value

A data frame of data availability statistics for each column of x.

Details

See also vignettes: vignette("analysis") and vignette("imputation").

Examples

# data availability of "airquality" data set
get_data_avail(airquality)
#>     N_missing N_zero N_miss_or_zero Dat_Avail Non_Zero
#> 1           0      0              0 1.0000000        1
#> 2           0      0              0 1.0000000        1
#> 3           0      0              0 1.0000000        1
#> 4           0      0              0 1.0000000        1
#> 5           2      0              2 0.6666667        1
#> 6           1      0              1 0.8333333        1
#> 7           0      0              0 1.0000000        1
#> 8           0      0              0 1.0000000        1
#> 9           0      0              0 1.0000000        1
#> 10          1      0              1 0.8333333        1
#> 11          1      0              1 0.8333333        1
#> 12          0      0              0 1.0000000        1
#> 13          0      0              0 1.0000000        1
#> 14          0      0              0 1.0000000        1
#> 15          0      0              0 1.0000000        1
#> 16          0      0              0 1.0000000        1
#> 17          0      0              0 1.0000000        1
#> 18          0      0              0 1.0000000        1
#> 19          0      0              0 1.0000000        1
#> 20          0      0              0 1.0000000        1
#> 21          0      0              0 1.0000000        1
#> 22          0      0              0 1.0000000        1
#> 23          0      0              0 1.0000000        1
#> 24          0      0              0 1.0000000        1
#> 25          1      0              1 0.8333333        1
#> 26          1      0              1 0.8333333        1
#> 27          2      0              2 0.6666667        1
#> 28          0      0              0 1.0000000        1
#> 29          0      0              0 1.0000000        1
#> 30          0      0              0 1.0000000        1
#> 31          0      0              0 1.0000000        1
#> 32          1      0              1 0.8333333        1
#> 33          1      0              1 0.8333333        1
#> 34          1      0              1 0.8333333        1
#> 35          1      0              1 0.8333333        1
#> 36          1      0              1 0.8333333        1
#> 37          1      0              1 0.8333333        1
#> 38          0      0              0 1.0000000        1
#> 39          1      0              1 0.8333333        1
#> 40          0      0              0 1.0000000        1
#> 41          0      0              0 1.0000000        1
#> 42          1      0              1 0.8333333        1
#> 43          1      0              1 0.8333333        1
#> 44          0      0              0 1.0000000        1
#> 45          1      0              1 0.8333333        1
#> 46          1      0              1 0.8333333        1
#> 47          0      0              0 1.0000000        1
#> 48          0      0              0 1.0000000        1
#> 49          0      0              0 1.0000000        1
#> 50          0      0              0 1.0000000        1
#> 51          0      0              0 1.0000000        1
#> 52          1      0              1 0.8333333        1
#> 53          1      0              1 0.8333333        1
#> 54          1      0              1 0.8333333        1
#> 55          1      0              1 0.8333333        1
#> 56          1      0              1 0.8333333        1
#> 57          1      0              1 0.8333333        1
#> 58          1      0              1 0.8333333        1
#> 59          1      0              1 0.8333333        1
#> 60          1      0              1 0.8333333        1
#> 61          1      0              1 0.8333333        1
#> 62          0      0              0 1.0000000        1
#> 63          0      0              0 1.0000000        1
#> 64          0      0              0 1.0000000        1
#> 65          1      0              1 0.8333333        1
#> 66          0      0              0 1.0000000        1
#> 67          0      0              0 1.0000000        1
#> 68          0      0              0 1.0000000        1
#> 69          0      0              0 1.0000000        1
#> 70          0      0              0 1.0000000        1
#> 71          0      0              0 1.0000000        1
#> 72          1      0              1 0.8333333        1
#> 73          0      0              0 1.0000000        1
#> 74          0      0              0 1.0000000        1
#> 75          1      0              1 0.8333333        1
#> 76          0      0              0 1.0000000        1
#> 77          0      0              0 1.0000000        1
#> 78          0      0              0 1.0000000        1
#> 79          0      0              0 1.0000000        1
#> 80          0      0              0 1.0000000        1
#> 81          0      0              0 1.0000000        1
#> 82          0      0              0 1.0000000        1
#> 83          1      0              1 0.8333333        1
#> 84          1      0              1 0.8333333        1
#> 85          0      0              0 1.0000000        1
#> 86          0      0              0 1.0000000        1
#> 87          0      0              0 1.0000000        1
#> 88          0      0              0 1.0000000        1
#> 89          0      0              0 1.0000000        1
#> 90          0      0              0 1.0000000        1
#> 91          0      0              0 1.0000000        1
#> 92          0      0              0 1.0000000        1
#> 93          0      0              0 1.0000000        1
#> 94          0      0              0 1.0000000        1
#> 95          0      0              0 1.0000000        1
#> 96          1      0              1 0.8333333        1
#> 97          1      0              1 0.8333333        1
#> 98          1      0              1 0.8333333        1
#> 99          0      0              0 1.0000000        1
#> 100         0      0              0 1.0000000        1
#> 101         0      0              0 1.0000000        1
#> 102         1      0              1 0.8333333        1
#> 103         1      0              1 0.8333333        1
#> 104         0      0              0 1.0000000        1
#> 105         0      0              0 1.0000000        1
#> 106         0      0              0 1.0000000        1
#> 107         1      0              1 0.8333333        1
#> 108         0      0              0 1.0000000        1
#> 109         0      0              0 1.0000000        1
#> 110         0      0              0 1.0000000        1
#> 111         0      0              0 1.0000000        1
#> 112         0      0              0 1.0000000        1
#> 113         0      0              0 1.0000000        1
#> 114         0      0              0 1.0000000        1
#> 115         1      0              1 0.8333333        1
#> 116         0      0              0 1.0000000        1
#> 117         0      0              0 1.0000000        1
#> 118         0      0              0 1.0000000        1
#> 119         1      0              1 0.8333333        1
#> 120         0      0              0 1.0000000        1
#> 121         0      0              0 1.0000000        1
#> 122         0      0              0 1.0000000        1
#> 123         0      0              0 1.0000000        1
#> 124         0      0              0 1.0000000        1
#> 125         0      0              0 1.0000000        1
#> 126         0      0              0 1.0000000        1
#> 127         0      0              0 1.0000000        1
#> 128         0      0              0 1.0000000        1
#> 129         0      0              0 1.0000000        1
#> 130         0      0              0 1.0000000        1
#> 131         0      0              0 1.0000000        1
#> 132         0      0              0 1.0000000        1
#> 133         0      0              0 1.0000000        1
#> 134         0      0              0 1.0000000        1
#> 135         0      0              0 1.0000000        1
#> 136         0      0              0 1.0000000        1
#> 137         0      0              0 1.0000000        1
#> 138         0      0              0 1.0000000        1
#> 139         0      0              0 1.0000000        1
#> 140         0      0              0 1.0000000        1
#> 141         0      0              0 1.0000000        1
#> 142         0      0              0 1.0000000        1
#> 143         0      0              0 1.0000000        1
#> 144         0      0              0 1.0000000        1
#> 145         0      0              0 1.0000000        1
#> 146         0      0              0 1.0000000        1
#> 147         0      0              0 1.0000000        1
#> 148         0      0              0 1.0000000        1
#> 149         0      0              0 1.0000000        1
#> 150         1      0              1 0.8333333        1
#> 151         0      0              0 1.0000000        1
#> 152         0      0              0 1.0000000        1
#> 153         0      0              0 1.0000000        1