-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraphical_abstract.R
41 lines (33 loc) · 1.2 KB
/
graphical_abstract.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Graphical abstract for gastrotenterology submission
estimate <- c(0.62, 0.51, 0.93)
conf.low <- c(0.50, 0.29, 0.86)
conf.high <- c(0.78, 0.90, 1)
labs <- c(" Endogenous metabolites",
" Fatty acids",
" WCRF/AICR score")
par(mar=c(3,4,0,2))
library(metafor)
forest(estimate, ci.lb = conf.low, ci.ub = conf.high, refline = 1,
slab = labs, #alabs = c(0.2,1.2),
efac = c(0,0), psize = 1.5,
bg = c("dodgerblue","grey", "grey"),
header =c("Measure of Healthy Lifestyle", "Odds ratio per unit increase"),
rows = c(1,2,5), ylim = c(0,9), alim = c(0.25, 1.25),
xlim = c(-0.54, 1.6),
xlab = NA, annosym = c(" (", "-", ")"),
pch = 23)
text(-0.54, c(3,6), c("Metabolic signature of WCRF/AICR score", "Questionnaire-based assessment"), pos=4)
par("usr")
# Cut-down version
par(mar=c(3,4,0,2))
library(metafor)
forest(estimate, ci.lb = conf.low, ci.ub = conf.high, refline = 1,
efac = c(0,0), psize = 1.5,
rows = c(1,2,5), ylim = c(0,6), alim = c(0.2, 1.2),
xlim = c(-0.54, 1.8),
steps = 6,
slab = NA,
header = F,
top = 0,
xlab = NA, annosym = c(" (", "-", ")"),
pch = 18)