I am trying to visualize missing data patterns. I am using the aggr() function from the VIM package and keep receiving this Warning message:
In plot.aggr(res, ...) : not enough vertical space to display frequencies (too many combinations)
The problem is caused because I am trying to show too much data and cannot figure out how to resize the plot to allow for the extra data. I have 20 variables I'm trying to visualize and it will not fit.
I found this question but the solution does not work.
I've created an example that demonstrates the problem:
df <- data.frame(replicate(25,sample(0:1,1000,rep=TRUE)))
df2 <- as.data.frame(lapply(df, function(cc) cc[ sample(c(TRUE, NA),
prob = c(0.85, 0.15), size = length(cc), replace = TRUE) ]))
aggr(df2, plot = TRUE, combined=TRUE, sortVars=FALSE, sortCombs=TRUE,
numbers=TRUE, prop=c(FALSE, FALSE), only.miss=FALSE, cex.numbers=.6,
cex.axis=.6)