我正在尝试绘制Data
的森林图(下图(,但我只想更改组合研究的多边形的颜色。
法典:
forest(x = data$beta,sei = data$se,
xlab = " ",
psize = c(1,2,3,2,4,6),
pch = c(15,15,15,15,15,18))
然后我想使用:
addpoly(x = data$beta,sei = data$se,
col = c(rep("black",5),"red"),
pch = c(15,15,15,15,15,18))
但这没有用。颜色仍然是黑色的。
数据:
group beta se
Study111 -0.043430833437 0.255182175384
Study112 0.808777362855 0.278587375378
Study113 0.233386044408 0.316660371211
Study114 0.237572509459 0.195872577686
Study115 0.541210360393 0.264106181227
Combined 0.741210360393 0.164106181227
只需在forest
调用中添加颜色:
forest(x = data$beta,sei = data$se,
xlab = " ",
psize = c(1,2,3,2,4,6),
pch = c(15,15,15,15,15,18),
col = c(rep('black', 5), 'red'))