na_count: Count Number of NAs in a Vector or a Data Frame.

Description Usage Arguments Value See Also Examples

View source: R/na.r

Description

Count Number of NAs in a Vector or a Data Frame.

Usage

1

Arguments

x

A vector or a data frame.

Value

The number of NAs in the object x.

See Also

nas

Examples

1
2
3
4
5
6
7
8
x <- c(NA, 'a', 'b', NA, 'c')
na_count(x)
#=> 2

df <- data.frame(x=c(1, 2), y=c(3, NA), z=c(NA, NA))
na_count(df)
#=> x y z
#=> 0 1 2

lkdjiin/lkdjiinr documentation built on May 21, 2019, 7:33 a.m.