Generate RMD command to include a figure from a file

Allows to generate RMD code to include a figure defined in a pdf, png, jpg file. From multi page PDFs selected pages or page ranges can be included.

rmdFIGURE(
  file,
  caption = NULL,
  label = NULL,
  legend = NULL,
  pages = NULL,
  scale = 100,
  crop = TRUE,
  repeatLegend = TRUE,
  ignoreCaption = FALSE
)

Arguments

file

Character string, specifying the absolute or relative path to the figure file to include (pdf, png, jpg, etc.).

caption

Caption for the table. If NULL then the title information in the table text file is used as caption.

label

Character string to be used for cross-referencing.

legend

Character string with text that is written as "legend" under the figure.

pages

A character string with information about which pages of a multi-page PDF should be included into the report. If undefined all pages will be exported with the same caption and figure number. The legend will be repeated after each figure if argument repeatLegend is set to TRUE. Example: pages="3 5-8" exports page 3,5,6,7,and 8.

scale

Number value (percent) for scaling the figure.

crop

Boolean. If set to TRUE then figure will be cropped to remove surrounding white space.

repeatLegend

See legend.

ignoreCaption

Caption can be ignored if desired (no caption will be shown for figure)

Value

FIG command as IQRrmd object