Either data or file must be passed.
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)The path to a file or a connection containing the content
The width to display the image
The height to display the image
display_<text>
if (FALSE) ## (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>
')
#> Warning: IRdisplay can only be used from the IPython R kernel and R magic.
display_jpeg(file = url('https://dummyimage.com/600x400.jpg', 'wb'), width = 100) # \dontrun{}
#> Error in url("https://dummyimage.com/600x400.jpg", "wb"): cannot open the connection