0

我正在使用 {forestmodel} 包中的 forest_model 函数。我的分组因子中的级别名称很长,因此无法看到 forest_model 中的其他数据,因为“组”列太宽了。如何包装因子级别的文本?

我可以在面板参数中添加一些东西吗?调整包含组级别的列的宽度不起作用...

这是我的面板代码

mypanels <- list(
  list(width = 0.001, display = ~level, hjust = 0.5, 
heading = "Group" {{{{CAN I ADD SOMETHING HERE??}}}}),
  list(width = 0.01, item = "vline", hjust = 0.5),
  list(width = 0.05, display = ~n, hjust = 0.5, heading 
= "N"),
  list(width = 0.01, item = "vline", hjust = 0.5),
  list(width = 0.05, display = ~n_events, width = 0.05, 
hjust = 0.5, heading = "Events"),
  list(width = 0.1, item = "vline", hjust = 0.5),
  list(width = 0.55, item = "forest", hjust = 0.5, 
heading = "HR (95% CI)", linetype = "dashed",
       line_x = 0),
  list(width = 0.03, item = "vline", hjust = 1),
  list(width = 0.05, heading = "HR (95% CI)", hjust = 
0.5,
   display = ~ifelse(reference, "Reference", 
sprintf("%0.2f (%0.2f, %0.2f)",

trans(estimate), trans(conf.low), trans(conf.high))), 
display_na = NA),
  list(width = 0.01, item = "vline", hjust = 1),
  list(width = 0.03,
       display = ~ifelse(reference, "", 
format.pval(p.value, digits = 3, eps = 0.001)),
       display_na = NA, hjust = 0.5, heading = "P")
)
4

0 回答 0