mirror of
https://github.com/rstudio/shiny.git
synced 2026-02-02 10:45:06 -05:00
These functions were temporarily ripped out of Shiny and moved to the htmltools package. We've discovered that it's safe to keep including them in shiny; as long as the functions in shiny and the functions in htmltools are identical, the user won't receive a conflict warning.
33 lines
812 B
R
33 lines
812 B
R
% Generated by roxygen2 (4.0.1): do not edit by hand
|
|
\name{makeReactiveBinding}
|
|
\alias{makeReactiveBinding}
|
|
\title{Make a reactive variable}
|
|
\usage{
|
|
makeReactiveBinding(symbol, env = parent.frame())
|
|
}
|
|
\arguments{
|
|
\item{symbol}{A character string indicating the name of the variable that
|
|
should be made reactive}
|
|
|
|
\item{env}{The environment that will contain the reactive variable}
|
|
}
|
|
\value{
|
|
None.
|
|
}
|
|
\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 \code{NULL} if the variable did not exist).
|
|
}
|
|
\examples{
|
|
\dontrun{
|
|
a <- 10
|
|
makeReactiveBinding("a")
|
|
b <- reactive(a * -1)
|
|
observe(print(b()))
|
|
a <- 20
|
|
}
|
|
}
|
|
|