missingness | R Documentation |
missingness(df, group=NULL, pattern=FALSE,showNA=FALSE )
df |
dataframe or matrix |
group |
group (p.eg gender) |
pattern |
logical default FALSE. If true missing data pattern is printed |
showNA |
list with id of cases with completely missing data |
Ariadna Angulo-Brunet (ariadna.angulo@uab.cat), Carme Viladrich
mice
x<-c(1:5, NA)
y<-1:2
v1<-sample(x,80,replace=TRUE)
v2<-sample(x,80,replace=TRUE)
v3<-sample(x,80,replace=TRUE)
v4<-sample(x,80,replace=TRUE)
gender<- sample(y, 80, replace=TRUE)
df <- data.frame(v1, v2,v3,v4)
missingness(df)
#by group
missingness(df, group=gender)
#by group with data pattern and completely missing data list
missingness(df, group=gender, pattern=TRUE, showNA=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.