display: Create and use multiple available reprs

Description Usage Arguments Value See Also Examples

View source: R/display.r

Description

Both functions create a mimebundle for multiple reprs. display proceeds to publish it using publish_mimebundle. prepare_mimebundle returns it (see Value for details)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
display(
  obj,
  ...,
  mimetypes = getOption("jupyter.display_mimetypes"),
  error_handler = stop
)

prepare_mimebundle(
  obj,
  mimetypes = getOption("jupyter.display_mimetypes"),
  metadata = NULL,
  error_handler = stop
)

Arguments

obj

The object to create representations for

mimetypes

Mimetypes to create reprs for. The defaults are defined by the option jupyter.display_mimetypes. (see: IRdisplay-options)

error_handler

Function used when errors in individual reprs occur

metadata, ...

Metadata to attach to the result (can be expanded by additional metadata)

Value

prepare_mimebundle returns a list with items corresponding to the parameters of publish_mimebundle (data and metadata)

See Also

publish_mimebundle

Examples

1
2
3
4
5
bundle <- prepare_mimebundle(diag(3))

## Not run: ## (Run inside of an IRkernel)
display(help(display))
## End(Not run)

IRdisplay documentation built on Jan. 4, 2022, 5:08 p.m.