Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法根据文本更改森林图中完整行的颜色?
例如,在下面的图中,我希望能够有四种不同的行颜色,一种用于播放器列中的 DEF、RU、MID 和 FWD 中的每一种。
参数可以采用col颜色向量。所以,这样的事情应该有效:
col
library(metafor) dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg) cols <- c("red", "green", "blue")[match(dat$alloc, c("random", "alternate", "systematic"))] forest(dat$yi, dat$vi, col=cols)