shader – Getting error message in trying to run library(“vcd”) for Mosaic in R studio

I ran this code using the library(“vcd”) in R studio but I keep getting the error message below>

mosaic(~ gender + status, data = data, shade = TRUE, colorize = TRUE, gp = gpar(fill=matrix(c( “blue”,

Error in x[cbind(index, m)] : subscript out of bounds

I have adjusted and run the code severally but still getting the same output error.

mosaic(~ gender + status, data = data, shade = TRUE, colorize = TRUE, gp = gpar(fill=matrix(c( “blue”,

Error in x[cbind(index, m)] : subscript out of bounds

Read more here: Source link