display_<image> {IRdisplay}R Documentation

Display a specific image output

Description

Either data or file must be passed.

Usage

display_png(data = NULL, file = NULL, width = NULL, height = NULL)

display_jpeg(data = NULL, file = NULL, width = NULL, height = NULL)

display_pdf(data = NULL, file = NULL, width = NULL, height = NULL)

display_svg(data = NULL, file = NULL, width = NULL, height = NULL)

Arguments

data

The data as a raw vector (character vector for display_svg)

file

The path to a file or a connection containing the content

width

The width to display the image

height

The height to display the image

See Also

display_<text>

Examples

## Not run: ## (Run inside of an IRkernel)
display_png(file = 'image.png')
display_svg('
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 2 2">
  <circle r="1"/>
</svg>
')
display_jpeg(file = url('https://dummyimage.com/600x400.jpg', 'wb'), width = 100)
## End(Not run)


[Package IRdisplay version 1.1 Index]