I try to do a Heatmap on R and have four values (1,2,3,4) in my excel file that looks like this
data | Allgemein | Methode | Ergebnisse | Diskussion | Andere |
---|---|---|---|---|---|
1 | 4 | 3 | 2 | 4 | 4 |
2 | 4 | 3 | 2 | 4 | 4 |
3 | 4 | 3 | 2 | 4 | 4 |
4 | 4 | 3 | 2 | 4 | 4 |
5 | 2 | 3 | 2 | 4 | 4 |
6 | 4 | 2 | 3 | 4 | 4 |
7 | 4 | 2 | 2 | 4 | 4 |
8 | 4 | 2 | 1 | 4 | 4 |
I have different values (five times 3 and three times 2) in the category "Methode", but still it gives me only a different color for one of them:
pheatmap(df_num,
main = "Einhaltung von Items der CHEERS 2022 Checkliste nach Kategorien",
col=brewer.pal(4,"Greens"),
breaks = seq(1,4),
fontsize = 12,
cluster_rows=F,
cluster_cols=F,
cellwidth=20,
cellheight=20,
border_color="black",
legend_breaks = 1:4,
legend_labels = c("100 % erfüllt",
"zwischen > 75% und < 100% der Items",
"zwischen >50% und ≤75% der Punkte",
"≤50% der Punkte"))```