'Jupyter' Display Machinery

An interface to the rich display capabilities of 'Jupyter' front-ends (e.g. 'Jupyter Notebook') < https://jupyter.org>. Designed to be used from a running 'IRkernel' session < https://irkernel.github.io>.

IRdisplay is a front-end package for Jupyter. It’s automatically integrated into IRkernel when you open a Jupyter notebook using that kernel.

The primary, high level functions are:

display(obj, ..., mimetypes=<from option>, error_handler=stop)
display_png(data = NULL, file = NULL, width = NULL, height = NULL)
display_html(data = NULL, file = NULL)
# display_javascript(…), display_json(…), display_markdown(…), display_latex(…)

Use display to display an object in all configured mime types (see Configuration), and the display_* functions to display raw data you have in form of a file or a variable.

Manual use is possible via the *_mimebundle functions:

prepare_mimebundle(obj, mimetypes=<from option>, metadata=NULL, error_handler=stop)
publish_mimebundle(data, metadata = NULL)

Where prepare_mimebundle uses repr to create a mimebundle containing representations of objects, and publish_mimebundle sends such mimebundles to Jupyter.


You can add your own mime types that should be displayed via:

options(jupyter.display_mimetypes = union(getOption('jupyter.display_mimetypes'), ...))

If you want to create your own kernel reacting to display / publish_mimebundle calls, you can use:

options(jupyter.base_display_func = function(data, metadata = NULL) ...)


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.0 by Philipp Angerer, a year ago


Report a bug at https://github.com/IRkernel/IRdisplay/issues/

Browse source code at https://github.com/cran/IRdisplay

Authors: Thomas Kluyver [aut, cph] , Philipp Angerer [aut, cph, cre] , Jan Schulz [aut, cph]

Documentation:   PDF Manual  

MIT + file LICENSE license

Imports methods, repr

Suggests testthat, withr

Imported by IRkernel.

Suggested by RJSplot, h2o, magick, modelsummary, plotly, ursa.

See at CRAN