add_image {chronicle}R Documentation

Add an image to a chronicle Rmarkdown report

Description

Add an image to a chronicle Rmarkdown report

Usage

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


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')

[Package chronicle version 0.3 Index]