n_na {na.tools} | R Documentation |
Counts how many values are NA
Description
Returns the number of values that are NA
Usage
n_na(x)
na.howmany(x)
na.n(x)
pct_na(x)
na.pct(x)
Arguments
x |
object to count how many values are |
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
x <- c( 1, NA, NA, 4:5 )
n_na(x)
pct_na(x)
[Package na.tools version 0.3.1 Index]