create_broker: Create a broker object

View source: R/broker.R

create_brokerR Documentation

Create a broker object

Description

A broker is a subclass of reactive. It can hold extra information to facilitate (or broker) communication between the client and the server. For example, an input broker may contain HTML controls to be emitted on the client web page, as well as a function to connect the inputs from the client to the reactive expression.

Usage

create_broker(r, controls = NULL, connect = NULL, spec = NULL)

Arguments

r

A reactive expression.

controls

An HTML control, or a list of HTML controls.

connect

A function to run at render time. This function takes the Shiny session object as its only argument, and is used to connect the session with the broker object.

spec

Object to put in the Vega spec.

Details

Other types of brokers are possible. Another broker may create reactive observers and add information to the Vega spec, instead of having HTML controls. In this case, a reactive expression is still needed, although it can be a dummy value, like reactive(NULL).


ggvis documentation built on May 29, 2024, 1:12 a.m.