Classes and constructors to wrap output created by code

OutputWidget(append_output = FALSE, ...)

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

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

A list or environment within which the evaluation takes place

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

context

NULL or (after initialization) an object inclass "Context" -- see Context.

Methods

Inherited methods


Method new()

Initializing function

Usage

OutputWidgetClass$new(
  append_output = TRUE,
  envir = new.env(),
  use_display = FALSE,
  ...
)

Arguments

append_output

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

envir

An environment, where expressions are evaluated.

use_display

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

...

Any other arguments, passed to the superclass initializer.


Method do()

Evaluate one or several expresions

Usage

OutputWidgetClass$do(...)

Arguments

...

A single expression or several expressions included in curly braces.


Method eval()

Evaluate a single expression

Usage

OutputWidgetClass$eval(expr, ...)

Arguments

expr

The expression to be evaluated

...

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


Method evaluate()

Evaluate a single expression

Usage

OutputWidgetClass$evaluate(expressions, ...)

Arguments

expressions

A list of expressions.

...

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


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 cat()

Show textual output in the widget area, see cat.

Usage

OutputWidgetClass$cat(..., sep = " ")

Arguments

...

One or more character arguments

sep

A character string used as separator


Method print()

Show printed output in the widget area, see print

Usage

OutputWidgetClass$print(x, ...)

Arguments

x

Any argument to be 'print'ed

...

Further arguments to be passed to print


Method clear_output()

Clear the output

Usage

OutputWidgetClass$clear_output(wait = FALSE)

Arguments

wait

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


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.