get_wh | R Documentation |
get_wh
can be used to find the correct width and height of the forestplot
for saving, as the width and height is difficult to fit for saving.
get_wh(plot, unit = c("in", "cm", "mm"))
plot |
A forest plot object. |
unit |
Unit of the plot size in |
A named vector of width and height
## Not run:
dt <- read.csv(system.file("extdata", "example_data.csv", package = "forestploter"))
dt <- dt[1:6,1:6]
dt$` ` <- paste(rep(" ", 20), collapse = " ")
p <- forest(dt[,c(1:3, 7)],
est = dt$est,
lower = dt$low,
upper = dt$hi,
ci_column = 4)
# get_wh example
p_wh <- get_wh(p)
pdf('test.pdf',width = p_wh[1], height = p_wh[2])
plot(p)
dev.off()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.