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/timesaveR documentation built on Nov. 29, 2024, 4:47 a.m.