na_prop_overall | R Documentation |
Computes the proportion of data that is missing in a given data set.
na_prop_overall(x)
na_prop_by_variable(x)
na_prop_by_observation(x)
na_count_overall(x)
na_count_by_variable(x)
na_count_by_observation(x)
x |
A vector of length |
Overall: a single numeric value between [0, 1]
or a count between [0, N]
.
Variable: P
different numeric values between [0, 1]
or counts between [0, N]
.
Observation: N
different numeric values between [0, 1]
or counts between [0, P]
.
# By vector
x = c(1, 2, NA, 4)
na_prop_overall(x)
na_count_overall(x)
# By Data Frame
missing_df = data.frame(
a = c(1, 2, NA, 4),
b = c(3, NA, 2, NA)
)
# Proportion
na_prop_overall(missing_df)
na_prop_by_variable(missing_df)
na_prop_by_observation(missing_df)
# Counts
na_count_overall(missing_df)
na_count_by_variable(missing_df)
na_count_by_observation(missing_df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.