基于MR分析结果绘制森林图

Usage,
mr_plot_forest(
  data_input,
  plot_width = 12,
  plot_height = 8,
  out_path = "./",
  out_prefix = "mr_plot_forest"
)

参数

data_input

mr_local()或者mr_online()的输出结果table_s2_mr_results.csv,可根据结局和暴露对数据进行筛选

plot_width

绘制森林图的宽度

plot_height

绘制森林图的高度

out_path

输出文件的地址

out_prefix

输出文件的前缀,默认为"mr_plot_forest"

森林图

Examples

ts2 <- read.csv("table_s2_mr_results.csv",row.names = 1)
ts2 <- ts2[ts2$id.outcome == "ieu-a-7",]
mr_plot_forest(data_input = ts2,plot_width = 18,plot_height = 8,out_dir = "./")