Skip to contents

Classes and constructors to wrap output created by code

Usage

OutputWidget(append_output = FALSE, ...)

# S3 method for class 'OutputWidget'
with(data, expr, envir = list(), enclos = parent.frame(), clear = TRUE, ...)

Arguments

append_output

Logical value, whether new output is appended to existing output in the widget or the output is overwritten

...

Other arguments, ignored.

data

An "OutputWidget" object

expr

An expression to evaluate, or a sequence of expression, encapsulated by curly braces.

envir

An environment or a list within which `expr` is evaluated.

enclos

An enclosing environment.

clear

A logical value, whether clear the output before evaluating `expr`

Super classes

HasTraits -> Widget -> DOMWidget -> OutputWidget

Public fields

_view_name

Name of the Javascript model view in the frontend

_model_name

Name of the Javascript model in the frontend

_view_module

Name of the module where the view is defined

_model_module

Name of the Javascript module with the model

_view_module_version

Version of the module where the view is defined

_model_module_version

Version of the module where the model is defined

msg_id

Unicode string with the id of the last message sent to the frontend.

outputs

A list with output strings

Methods

Inherited methods


OutputWidget$new()

Initializing function

Usage

OutputWidget$new(append_output = TRUE, graphics = FALSE, ...)

Arguments

append_output

Logical, whether existing output should be appended to or overwritten.

graphics

Logical, whether graphics should be captured and processed within the widget

...

Any other arguments, passed to the superclass initializer.


OutputWidget$display()

A variant of display for output within a display widget.

Usage

OutputWidget$display(...)

Arguments

...

Arguments passed to the function display_data.


OutputWidget$clear()

Clear the output

Usage

OutputWidget$clear(wait = FALSE)

Arguments

wait

Logical, whether to wait for the frontend to clear the output.


OutputWidget$stdout()

Handle output via stdout stream

Usage

OutputWidget$stdout(text)

Arguments

text

A character string being output


OutputWidget$stderr()

Handle output via stderr stream

Usage

OutputWidget$stderr(text)

Arguments

text

A character string being output


OutputWidget$handle_msg()

Handle a (JSON) message sent to the output

Usage

OutputWidget$handle_msg(msg)

Arguments

msg

The message, a list


OutputWidget$clone()

The objects of this class are cloneable with this method.

Usage

OutputWidget$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.