powered by
Visualize the proportion of missingness per variable in a barplot.
# S3 method for shapeNA barplot(height, sortNA = FALSE, ...)
A shapeNA object.
shapeNA
A logical. If FALSE, the original variable order is kept. Otherwise the variables are ordered from least to most missingness.
FALSE
Additional graphical arguments passed to barplot.
barplot
Invisibly returns a named vector holding the proportion of missingness per variable.
# NOT RUN { S <- toeplitz(seq(1, 0.1, length.out = 3)) x <- mvtnorm::rmvt(100, S, df = 5) y <- mice::ampute(x, mech='MCAR')$amp res <- classicShapeNA(y) barplot(res) # }
Run the code above in your browser using DataLab