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.

enclos

An enclosing environment.

Super classes

RKernel::HasTraits -> RKernel::Widget -> RKernel::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


Method new()

Initializing function

Usage

OutputWidgetClass$new(append_output = TRUE, ...)

Arguments

append_output

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

...

Any other arguments, passed to the superclass initializer.

envir

An environment, where expressions are evaluated.

use_display

Logical, whether the display mechanism is used internally for output streams.


Method display()

A variant of display for output within a display widget.

Usage

OutputWidgetClass$display(...)

Arguments

...

Further arguments, passed on to the 'evaluate' method of the Context class,


Method clear()

Clear the output

Usage

OutputWidgetClass$clear(wait = FALSE)

Arguments

wait

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


Method stdout()

Usage

OutputWidgetClass$stdout(text)


Method stderr()

Usage

OutputWidgetClass$stderr(text)


Method clone()

The objects of this class are cloneable with this method.

Usage

OutputWidgetClass$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.