naniar creating extra plot in rmarkdown

87 views Asked by At

I am using the package naniar and it is producing an extra plot. I have read the documentation and could not figure out why this empty plot is appearing. Is there a way to remove it but still keep the second figure and say the second and third if that existed?

enter image description here

library(naniar)

# create data 
data0 <- data.frame("A" = c(NA,NA,1,1), "B"= c(1,NA,1,1),"C"= c("john","john",NA,NA),"D"= c("john","john","john","john"))

# Naniar plot
nval <- naniar::n_case_miss(data0) 
naniar::gg_miss_upset(data0,nsets=nval)
0

There are 0 answers