Functions to create image elements.

img_get(
  name,
  dir = file.path("img"),
  width = NULL,
  height = NULL,
  as_html = TRUE,
  style = NULL,
  collapse = " ",
  default = "",
  verbose = FALSE
)

img_link(
  link,
  img,
  alt = NULL,
  width,
  class = "image",
  id = NULL,
  text_before = NULL,
  text_after = NULL,
  style = NULL
)

Arguments

name

Image name.

dir

Directory to look for image files in.

width

Image width.

height

Image height.

as_html

Wrap in HTML element.

style

HTML element style.

collapse

an optional character string to separate the results. Not NA_character_.

default

Default value when image file not found.

verbose

Print messages.

link

URL to use.

img

Path or URL to image.

alt

HTML element alt description.

class

HTML element class.

id

HTML element id.

text_before

HTML element text before image.

text_after

HTML element text after image.

Value

Formatted data.

Functions

  • img_get(): img_

  • img_link(): img_