n_na: Counts how many values are NA

Description Usage Arguments Details Value Examples

Description

Returns the number of values that are NA

Usage

1
2
3
4
5
6
7
8
9
n_na(x)

na.howmany(x)

na.n(x)

pct_na(x)

na.pct(x)

Arguments

x

object to count how many values are NA

Details

n_na counts the number of missing values. na.n is an alias in the dplyr style.

pct_na gives the percentage of values that are NA

Value

n_na returns an integer. pct_na returns a numeric value 0-1.

Examples

1
2
3
  x <- c( 1, NA, NA, 4:5 )
  n_na(x)
  pct_na(x)

na.tools documentation built on May 2, 2019, 8:24 a.m.