Tried the following code:
png(filename = "forestv8aall.png",
width = 2000,
height = 1750,
res = 135)
forest(allexpcollapsed,
alim =c(-2, 4),
xlim =c(-4, 5),
ilab = totalexp$N.sample.size..post.attrition.,
ilab.xpos = -2,
xlab = "Omission-bias effect",
cex = .8)
# Add headlines to the forest
op <- par(font=4)
text(-4,
allexpcollapsed$k + 2,
"Author(s), Year, and Study #",
pos = 4,
cex = .8)
text(5,
allexpcollapsed$k + 2,
"Observed [95% CI]",
pos = 2,
cex = .8)
text(-2,
allexpcollapsed$k + 2,
"Sample size",
cex=.8)
par(op)
dev.off()
The below is shown in the RMD Knitted file:
## png
## 2
I was able to see the output png file in the same folder though.
How to fix this so that the high-resolution plot is also shown in the RMD knitted word file?
Thanks in advance!
question from:
https://stackoverflow.com/questions/65650071/how-to-save-a-plot-at-high-resolution-and-then-show-it-in-the-rmarkdown-knitted 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…