count_na: Amount of missing values in a data set

View source: R/count_na.R

count_naR Documentation

Amount of missing values in a data set

Description

This function produces a table with the overall amount of missing values in a data set (absolute and relative values).

Usage

count_na(data, percent = TRUE, col_sum = TRUE)

Arguments

data

A data frame.

percent

A logical value indicating whether to compute also the percentage (defaults to TRUE).

col_sum

A logical value indicating whether the column sums should be returned.

Value

A tibble.

Examples

d <- mtcars
d[4,3] <- NA # Create missing values to illustrate function

count_na(d, percent = FALSE)
count_na(d, col_sum = FALSE)

masurp/pmmisc documentation built on May 3, 2024, 7:13 p.m.