View source: R/loch_missingness_monster.R
loch_missingness_monster | R Documentation |
Provides an easy-to-interpret in-console breakdown of missingness in rectangular data (data frames and matrices).
loch_missingness_monster(dat, percent = NA)
dat |
A data frame or matrix. |
percent |
A number [0, 100] (optional). |
loch_missingness_monster()
tells you:
The total number of missing values (NA
) in the data set.
A table indicating the count and percent of missing values per column.
Optionally, the number of rows missing values in excess of a percent that you specify.
(The output comes in sentence form if there are less or equal to than 10 variables; it comes in table form if there are more than 10.)
Text output.
lmm_example <- replicate(12, sample(1:10, 3, replace = TRUE))
lmm_example[sample(length(lmm_example), 13, replace = FALSE)] <- NA
colnames(lmm_example) <- paste0('var', 1:12, sep = '')
loch_missingness_monster(lmm_example, 40)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.