Skip to content
/ IRdisplay Public

❗ This is a read-only mirror of the CRAN R package repository. IRdisplay — 'Jupyter' Display Machinery. Homepage: https://github.com/IRkernel/IRdisplay Report bugs for this package: https://github.com/IRkernel/IRdisplay/issues/

License

Notifications You must be signed in to change notification settings

cran/IRdisplay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IRdisplay b-CI b-CRAN

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_jpeg(…); display_pdf(…); display_svg(…)

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.

Configuration

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) ...)

About

❗ This is a read-only mirror of the CRAN R package repository. IRdisplay — 'Jupyter' Display Machinery. Homepage: https://github.com/IRkernel/IRdisplay Report bugs for this package: https://github.com/IRkernel/IRdisplay/issues/

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages