create_input: Create a new interactive "input" object.

View source: R/input.R

create_inputR Documentation

Create a new interactive "input" object.

Description

An interactive input object is a reactive expression which wraps a reactive value. When the plot is rendered, an observer is created which pushes values into the reactive value in response to changes of an input object. Those changes invalidate the reactive expression, which will return the value, optionally passed through a mapping function.

Usage

create_input(
  id = rand_id("input_"),
  default = NULL,
  map = identity,
  controls = NULL
)

Arguments

id

The name of the input object in the Shiny app, such as "slider_1338869".

default

The default (starting) value for the input.

map

A mapping function. Defaults to identity, which simply returns the value unchanged.

controls

A Shiny HTML tag object representing the UI for the controls.

Details

This function is designed to be used by authors of new types of interactive inputs. If you are a ggvis user, please use one of the more specific input functions starting with the input_.


ggvis documentation built on March 31, 2023, 7:13 p.m.