我正在尝试为我的数据制作 beeswarm 和箱线图,但是当我希望它们按处理顺序时,beeswarm 会将分类变量按字母顺序排列。
iMono <- beeswarm(iMono ~ Treatment, data=MyeloidLiver, ylab = "% Inflammatory",
log = FALSE, pch=16, main = '% Inflammatory Monocytes v Treatment',
col = rainbow(4), cex.axis = 1, cex = 1) +
bxplot(iMono ~ Treatment, data=MyeloidLiver, add=TRUE)
我尝试过使用levels = c()
andlabels = c()
但级别不是 beeswarm 的图形参数,并且标签会更改标签而不重新排序相应的数据。