Description Usage Arguments Value See Also Examples
What percentage of NA values are in a vector or in each variable of a data frame?
1 | na_percent(x)
|
x |
A vector or a data frame. |
The percentage (between 0: no NAs, and 100: all values are NAs) of the object x.
1 2 3 4 5 6 7 8 | x <- c(NA, 'a', 'b', NA, 'c')
na_percent(x)
#=> 40
df <- data.frame(x=c(1, 2), y=c(3, NA), z=c(NA, NA))
na_percent(df)
#=> x y z
#=> 0 50 100
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.