This function allows us to plot matrices easily
plot_matrix(x, ...) # S3 method for matrix plot(x, ...)
x | a matrix |
---|---|
... | for S3 generic API consistency; does nothing |
a ggplot object
T <- TRUE; F <- FALSE x1 <- m(T, T, T, F, T | T, T, F, T, T | F, T, T, T, F | T, T, T, T, T | F, F, T, T, T | F, T, T, T, F) plot_matrix(x1)