magickForKnitr: Display an image in rmarkdown with knitr

View source: R/magick_helpers.R

magickForKnitrR Documentation

Display an image in rmarkdown with knitr

Description

Display an image in rmarkdown with knitr

Usage

magickForKnitr(
  imgs,
  .prefix = "tile",
  .resize = NULL,
  .path = tempdir(),
  .include = F,
  .print = T
)

Arguments

imgs

a magick image or cellMagick output

.prefix

A string prepended to the file name, "" by default.

.resize

a cellMagick image resize string as "200x200" (default NULL, for no resizing).

.path

Directory where the output should be saved.

.include

Set to true to use knitr::include_graphics directly.

.print

Print the image path.

Value

An path to a temporary image file.


gerbeldo/tidycell documentation built on Aug. 15, 2022, 2:35 p.m.