IRkernel

Display a specific image output

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

Description

Either data or file must be passed.

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('http://example.com/example.jpg'), width = 100) ## ---------------------------------------------