From 75567b3461d11baad8476deecaebfb0cc08a96ef Mon Sep 17 00:00:00 2001 From: Stephan Daus Date: Sun, 24 Nov 2024 13:39:19 +0100 Subject: [PATCH] Minor fix to template `r x` --- R/zzz.R | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/R/zzz.R b/R/zzz.R index 449426a..59f9a10 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -259,10 +259,13 @@ if(!all(sapply(plots, is.null))) {{ lapply(names(plots), function(.x) {{ knitr::knit_child(text = c( - '##### `r .x', + '##### `r .x`', + '', + '', '```{{r}}', 'library(saros)', 'knitr::opts_template$set(fig = list(fig.height = fig_height_h_barchart2(plots[[.x]])))', + '', '```', '', '```{{r, opts.label=\\'fig\\'}}', @@ -275,8 +278,7 @@ if(!all(sapply(plots, is.null))) {{ 'girafe(ggobj = plots[[.x]])', '```', '', - '`r x`', - '' + '`r x`' ), envir = environment(), quiet = TRUE) }}) |> unlist() |> cat(sep = '\\n') }}