Detect NA takes a tibble and return the number and share of missing values for each variable

detect_na(table)

Arguments

table

name of the input variable

Value

a tibble with 3 columns (variable, n_missing, share_missing)

Examples

library("readxl") read_excel( path = system.file( "extdata", "panorama.xlsx", package = "tricky") ) %>% set_standard_names() %>% detect_na()
#> # A tibble: 4 x 3 #> # Groups: variable [4] #> variable n_missing share_missing #> <fct> <int> <dbl> #> 1 en_savoir_plus_sur_le_projet 38 66.7 #> 2 debut 1 1.75 #> 3 financement_programme_s_ 1 1.75 #> 4 lien_vers_les_projets_annuels_de_performances 6 10.5