dplyr proportion of nas code example
Example 1: percent of missing data in df r
# Apply on dataframe with missing values
sum(is.na(x))/prod(dim(x))
Example 2: percentage rows are na
sum(is.na(x))/prod(dim(x))
# Apply on dataframe with missing values
sum(is.na(x))/prod(dim(x))
sum(is.na(x))/prod(dim(x))