MISSING_INFO | R Documentation |
Frequencies and proportions of missing values
MISSING_INFO(data, verbose)
data |
An all-numeric dataframe where the rows are cases & the columns are the variables. |
verbose |
(optional) Should detailed results be displayed in console? TRUE (default) or FALSE |
Provides the number of cases with each of N missing values (NA values), along with the proportions, cumulative proportions, and the cumulative Ns.
A matrix with the following columns:
N_cases |
The number of cases |
N_missing |
The number of missing values |
Proportion |
The proportion of missing values |
Cum_Proportion |
The cumulative proportion of missing values |
Cum_N |
The cumulative number of cases |
Brian P. O'Connor
MISSING_INFO(airquality)
# add NA values to the Rosenberg Self-Esteem scale items, for illustration
data_RSE_missing <- data_RSE
data_RSE_missing[matrix(rbinom(prod(dim(data_RSE_missing)), size=1, prob=.3)==1,
nrow=dim(data_RSE_missing)[1])] <- NA
MISSING_INFO(data_RSE_missing)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.