makeReactiveBinding: Make a reactive variable

Description Usage Arguments Value Examples

View source: R/reactives.R

Description

Turns a normal variable into a reactive variable, that is, one that has reactive semantics when assigned or read in the usual ways. The variable may already exist; if so, its value will be used as the initial value of the reactive variable (or NULL if the variable did not exist).

Usage

1

Arguments

symbol

A character string indicating the name of the variable that should be made reactive

env

The environment that will contain the reactive variable

Value

None.

Examples

1
2
3
4
5
6
7
8
## Not run: 
a <- 10
makeReactiveBinding("a")
b <- reactive(a * -1)
observe(print(b()))
a <- 20

## End(Not run)

sheikhbarabas/shiny documentation built on May 29, 2019, 9:22 p.m.