add_image: Add an image to a chronicle Rmarkdown report

Description Usage Arguments Value Examples

View source: R/images.R

Description

Add an image to a chronicle Rmarkdown report

Usage

1
2
3
4
5
6
7
8
9
add_image(
  report = "",
  image_path,
  image_caption = NULL,
  image_title = NULL,
  title_level = 2,
  fig_width = NULL,
  fig_height = NULL
)

Arguments

report

Character string containing all the R Markdown chunks previously added. Default is ”, an empty report.

image_path

The path to the image that will be added to the report.

image_caption

A caption to be printed for the image.

image_title

The title of the text section. Default is NULL.

title_level

Level of the section title of this text (ie, number of # on Rmarkdown syntax.)

fig_width

Width of the figures printed from this code.

fig_height

Height of the figures printed from this code.

Value

The text of the Rmarkdown report plus an additional section with the text.

Examples

1
2
3
4
library(chronicle)
report <- add_image(image_path = 'readme1.png',
                    image_caption = 'This is the caption of the image',
                    image_title = 'This is the image that I want to include')

chronicle documentation built on June 25, 2021, 9:09 a.m.