sum_NA: Investigate missingness

Description Usage Arguments Details Value Examples

View source: R/sum_NA.R

Description

Investigate missingness

Usage

1
2
3
4
5

Arguments

x

a vector with multiple elements

Details

These functions return the number of NA, NaN, or blank values in a vector. Such information can serve as a diagnostic or used outright, e.g. in longitudinal settings. If you are dealing with singletons, you should just use the underlying function, e.g. is.na. For total blank values, the stringi package is required.

Value

The number of non-elements so defined

Examples

1
2
3
4
5
library(lazerhawk)
sum_blank(c('    ', '', 'c', 'd'))
sum_NA(c(NA, '', 'c', NA))
sum_NaN(c(1:3, NA, NaN))
sum_NA(1:4)

mclark--/lazerhawk documentation built on July 17, 2018, 3:11 a.m.