build_fig_html: Create an R markdown/HTML backbone for a figure call.

View source: R/markdown_tools.R

build_fig_htmlR Documentation

Create an R markdown/HTML backbone for a figure call.

Description

Builds a character with the R code chunk for the given figure and HTML/CSS styling of the legend.

Usage

build_fig_html(
  figure_call,
  ref_name = "figure",
  caption = "figure",
  figure_w = 5,
  figure_h = 7,
  legend = TRUE,
  legend_text = "<<legend>>",
  style_ref = "legend"
)

Arguments

figure_call

call to a figure object.

ref_name

name of the figure chunk in the R markdown output.

caption

figure caption.

figure_w

figure width in inches or a call to a function returning a numeric provided as a character.

figure_h

figure height in inches or a call to a function returning a numeric provided as a character.

legend

logical, should a text with the figure reference in bold be included below the figure chunk?

legend_text

detailed legend text.

style_ref

name of the CSS style of the legend text.

Value

a string with the requested R code chunk and HTML legend.


PiotrTymoszuk/figur documentation built on July 16, 2024, 1:15 a.m.