Skip to content
Snippets Groups Projects
Commit 36f3b118 authored by David Dorchies's avatar David Dorchies
Browse files

feat: auto-adjust figure definition from out.width

Refs #6
parent 86f5b58e
No related branches found
Tags 4.7.0
1 merge request!11Resolve "Normalize dimension of images in report"
......@@ -25,6 +25,13 @@ knitr::opts_chunk$set(
always_allow_html = TRUE
)
getFigWidth <- function(out.width = knitr::opts_chunk$get("out.width")) {
6 * readr::parse_number(out.width) / 70
}
knitr::opts_chunk$set(
fig.width = getFigWidth()
)
if (Sys.getenv("CACHE_CI") != "") {
knitr::opts_chunk$set(
cache.path = file.path(Sys.getenv("CACHE_CI"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment