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",
-
"green", "red", "black"))))
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",
-
"green", "red", "black"))))
Error in x[cbind(index, m)] : subscript out of bounds