Add a column describing if there are any missings in the dataset

add_label_missings(data)

Arguments

data

data.frame

Value

data.frame with a column "any_missing" that is either "Not Missing" or "Missing" for the purposes of plotting / exploration / nice print methods

See also

Examples

airquality %>% add_label_missings()
#> # A tibble: 153 x 7 #> Ozone Solar.R Wind Temp Month Day any_missing #> <int> <int> <dbl> <int> <int> <int> <chr> #> 1 41 190 7.4 67 5 1 Not Missing #> 2 36 118 8 72 5 2 Not Missing #> 3 12 149 12.6 74 5 3 Not Missing #> 4 18 313 11.5 62 5 4 Not Missing #> 5 NA NA 14.3 56 5 5 Missing #> 6 28 NA 14.9 66 5 6 Missing #> 7 23 299 8.6 65 5 7 Not Missing #> 8 19 99 13.8 59 5 8 Not Missing #> 9 8 19 20.1 61 5 9 Not Missing #> 10 NA 194 8.6 69 5 10 Missing #> # ... with 143 more rows