I have a data structure that can be imagined as this:
a <- c("P","F","P","P")
b <- c("P","P","P","P")
c <- c("P","P","N","P")
d <- c("P","F","P","F")
data <- data.frame(a,b,c,d)
I wish to plot the values as blocks of colour. I have seen the same/a similar question here and I would like the same type of ggplot
output. I am new to plotting in R how may I adapt the code?