loch_missingness_monster: loch_missingness_monster

View source: R/loch_missingness_monster.R

loch_missingness_monsterR Documentation

loch_missingness_monster

Description

Provides an easy-to-interpret in-console breakdown of missingness in rectangular data (data frames and matrices).

Usage

loch_missingness_monster(dat, percent = NA)

Arguments

dat

A data frame or matrix.

percent

A number [0, 100] (optional).

Details

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.)

Value

Text output.

Examples

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)


jacob-gg/manager documentation built on July 2, 2024, 2:09 a.m.