new_data_block | R Documentation |
Data blocks typically do not have data inputs and represent root nodes in analysis graphs. Intended as initial steps in a pipeline, such blocks are responsible for providing down-stream blocks with data.
new_data_block(server, ui, class, ctor = sys.parent(), ...)
new_dataset_block(dataset = character(), package = "datasets", ...)
new_static_block(data, ...)
server |
A function returning |
ui |
A function with a single argument ( |
class |
Block subclass |
ctor |
String-valued constructor name or function/frame number (mostly for internal use or when defining constructors for virtual classes) |
... |
Forwarded to |
dataset |
Selected dataset |
package |
Name of an R package containing datasets |
data |
Data (used directly as block result) |
All blocks constructed via new_data_block()
inherit from
data_block
.
This data block allows to select a dataset from a package, such as
the datasets package available in most R installations as one of the
packages with "recommended" priority. The source package can be chosen at
time of block instantiation and can be set to any R package, for which then
a set of candidate datasets is computed. This includes exported objects that
inherit from data.frame
.
Mainly useful for testing and examples, this block simply returns the data with which it was initialized. Serialization of static blocks is not allowed and exported code will not be self-contained in the sense that it will not be possible to reproduce results in a script that contains code from a static block.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.