移除forestploter包中森林图的置信区间箭头
使用forestploter包绘制森林图时移除置信区间箭头的问题
我正在使用{forestploter}包绘制森林图。在以下示例中,第二行(var = "b")的置信区间下限(0.4)低于我设定的x轴下限(0.5),此时forest()函数会自动绘制箭头。
library(forestploter) df <- data.frame(var = c("a", "b", "c"), CI = paste(rep(" ", 20), collapse = ""), est = c(0.9, 0.7, 1.0), lower = c(0.6, 0.4, 0.7), upper = c(1.1, 0.9, 1.2)) forest(df[, 1:2], est = df$est, lower = df$lower, upper = df$upper, ci_column = 2, ref_line = 1, x_trans = "log", arrow_lab = c("Placebo Better", "Treatment Better"), xlim = c(0.5, 2), ticks_at = c(0.5, 1, 2), theme = forest_theme(base_size = 9, ci_Theight = 0.25))

我希望移除该箭头,将区间左端保留为水平线。
我尝试的方法是在forest_theme()中设置arrow_length = 0:
theme = forest_theme(base_size = 9, ci_Theight = 0.25, arrow_length = 0)
但该设置仅隐藏了x轴下方的箭头,而非置信区间上的箭头。

请问如何修改此行为?
内容的提问来源于stack exchange,提问作者user18894435
相关产品推荐
相关产品推荐

