miss_frac | R Documentation |
This functions simply reports the number of missings as the percentage of the maximum number of rows. It also works on single variables.
miss_frac(df, vars = 1:NCOL(df))
df |
data.frame or variable |
vars |
subset of variables, defaults to all |
fruits = c('apple', 'banana', NA, 'pear', 'pinapple', NA)
pets = c('cat', 'dog', 'anteater', NA, NA, NA)
favorites = data.frame(fruits, pets)
miss_frac(favorites)
miss_frac(favorites$fruits)
miss_frac(favorites, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.