na_share: Calculate share of NA-values in vector

na_shareR Documentation

Calculate share of NA-values in vector

Description

Returns share of NA values in vector by wrapping 'sum(is.na(x)) / length(x)' and rounding the result

Usage

na_share(x, round = 2)

Arguments

x

Vector

round

Number of digits to round result to

Examples

x <- c(NA, 1, 2)
na_share(x)

LukasWallrich/rNuggets documentation built on Aug. 26, 2022, 11:03 a.m.