Blocks consist of an expression that defines what the block produces (given the result of the previous block combined with user input), plus a class attribute

new_block(
  server,
  ui,
  class,
  ctor,
  ctor_pkg,
  dat_valid = NULL,
  allow_empty_state = FALSE,
  name = NULL,
  ...
)

is_block(x)

as_block(x, ...)

# S3 method for class 'block'
as_block(x, ...)

# S3 method for class 'list'
as_block(x, ...)

block_name(x)

block_name(x) <- value

block_ctor(x)

block_expr_server(x)

block_expr_ui(x)

block_dat_valid(x)

block_has_data_validator(x)

validate_data_inputs(x, data)

block_inputs(x, ...)

# S3 method for class 'block'
block_inputs(x, ...)

block_arity(x)

blocks(...)

is_blocks(x)

as_blocks(x, ...)

# S3 method for class 'blocks'
as_blocks(x, ...)

# S3 method for class 'list'
as_blocks(x, ...)

# S3 method for class 'block'
as_blocks(x, ...)

# S3 method for class 'board'
block_inputs(x, ...)

new_data_block(server, ui, class, ctor = sys.parent(), ...)

new_file_block(server, ui, class, ctor = sys.parent(), ...)

new_parser_block(server, ui, class, ctor = sys.parent(), ...)

new_plot_block(server, ui, class, ctor = sys.parent(), ...)

new_transform_block(server, ui, class, ctor = sys.parent(), ...)

Arguments

server

A function returning shiny::moduleServer()

ui

A function with a single argument (ns) returning a shiny.tag

class

Block subclass

ctor

Constructor name (or function/frame number)

ctor_pkg

Package name (or NULL)

dat_valid

(Optioanl) input data validator

allow_empty_state

Either TRUE, FALSE or a character vector of state values that may be empty while still moving forward with block eval

name

Block name

...

Further (metadata) attributes

x

An object inheriting from "block"

value

New value

data

Data inputs