-4
我已經準備好一個數據框並在他身上使用ggplot。但最初的順序不受尊重。我如何尊重這個命令?重新排列ggplot與geom_bar(stat =「identity」)
Patient Nb_peptides Type_affinite
1 22 563 a
2 22 1040 b
3 22 11139 c
4 24 489 a
5 24 1120 b
6 24 11779 c
7 13 467 a
8 13 1239 b
9 13 14600 c
g_plot <- ggplot(data = nb_peptides_type,
aes(x = reorder(Patient, True_order),
y = Nb_peptides,
fill = Type_affinite)) +
geom_bar(stat = "identity")
print(g_plot)
什麼或在哪裏是'True_order'?我在代碼中看不到它... –