I have a dataset that includes categorical grades (not assessed, unmet, limitedly met, partially met, fully met) for various measures that are nested within 2 additional variables (chapter->goal->measurable element).
My two primary issues are:
-
I cannot get the chapter, goal, and measurable elements to stack on the y axis, only the measurable elements. This is an issue, as some measurable elements share the same number between different goals and chapters. If I can fix this, it may make my second question obsolete.
-
There are so many measurable elements that it appears to be too many to fit in the image. Is there a way to get it to break up the plot between multiple images or pages?
This is an example of the data (has been renamed and edited for privacy)
I am attempting to create a “heat map” of sorts [like the image below.]
(https://i.sstatic.net/kZxnjOb8.jpg)
[This is the result I am getting]
(https://i.sstatic.net/pzXpnnVf.png)
This is the code I am using
u2 <- data
mycol <- c("white","grey","red","orange","yellow","green")
heatmap(as.matrix(u2[,6:10]), # because heatmap will only work on a numeric matrix
col = mycol, # the colors above
margins=c(10,10), # to give enough room for the column labels at the bottom
scale="none", # do not scale each column to the same center
labRow=u2$`Measurable Element`, # the source of the row labels
Colv=NA) # do not reorder the columns