missing_table | R Documentation |
Returns a Table indicating the number and proportion of NA values for a selected set of variables.
missing_table(dfs, variables, df_names = NULL, varlabels = NULL)
dfs |
A character vector with names of data frames for which the missings per variable should be displayed. |
variables |
A character vector of variable names for which the missings should be displyed. |
df_names |
Either Null or a character vector of names, to relabel the data frames in the table with. |
varlabels |
Either Null, or a character vector of variable names, to relabel the variables in the table with. |
Returns a Table indicating the number and proportion of NA values for a selected set of variables. This can be used to get an overview of the data, detect errors after data rangeling, or find items in a survey, with especially, high item nonresponse.
## Get Data for comparison
data("card")
north <- card[card$south==0,]
white <- card[card$black==0,]
variables<- c("age","educ","fatheduc","motheduc","wage","IQ")
varlabels<-c("Age","Education","Father's Education",
"Mother's Education","Wage","IQ")
missing_tab<-sampcompR::missing_table(dfs = c("north","white"),
variables=variables,
df_names = c("North","White"),
varlabels=varlabels)
missing_tab
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.