Include figure comparisons in the certificate
Source:R/figure_comparison.R
render_figure_comparisons.RdWrites Markdown to include the images created by
compare_figures in the certificate, one per figure with a
caption. Use it in a chunk with results = "asis".
Usage
render_figure_comparisons(
files,
captions = basename(files),
width = "85%",
base_dir = quarto_document_dir()
)Arguments
- files
Paths to the comparison images, relative to the certificate source file.
- captions
Captions of the figures; default is the file name.
- width
Width of the figures in the certificate.
- base_dir
Directory to link the images relative to, or
NULLto link them byfiles. Defaults to the document's directory when Quarto renders it, andNULLotherwise.
Examples
if (FALSE) { # \dontrun{
render_figure_comparisons(comparisons$file,
captions = paste("Figure", 1:2, "of the article: published (top) and reproduced (bottom)."))
} # }