Skip to contents

wrapper around knitr::include_graphics that automatically handles file retrieval from improve, caching, and metadata display. Best used within RMarkdown code chunks.

Usage

includeGraphics(
  ident,
  from = pwd(),
  addAsLink = TRUE,
  caption = "",
  description = "",
  includeCaption = T,
  includeDescription = T,
  ...
)

Arguments

ident

Path, resource ID, or entity ID of the graphics file. Can be a relative path (from current step), absolute path, or improve identifier

from

Root path for resolving relative paths. Defaults to pwd() (current step location)

Logical. If TRUE, creates a link in the inventory for provenance tracking. Use improveClean() at workflow end to clean up links

caption

Custom caption text. If empty, defaults to entityID and lastModified timestamp

description

Custom description text. If empty, defaults to filename

includeCaption

Logical. If TRUE (default), sets the chunk option fig.cap to the caption text

includeDescription

Logical. If TRUE (default), prints the description text below the image

...

Additional arguments passed to knitr::include_graphics

Value

The result of knitr::include_graphics, which renders the image in the RMarkdown output.

References

ics1141

See also

getGraphics for underlying retrieval function, showGraphics for raw Markdown syntax generation