reactiveValues

0th

Percentile

Create an object for storing reactive values

This function returns an object for storing reactive values. It is similar to a list, but with special capabilities for reactive programming. When you read a value from it, the calling reactive expression takes a reactive dependency on that value, and when you write to it, it notifies any reactive functions that depend on that value.

Usage
reactiveValues(...)
See Also

isolate and is.reactivevalues.

Aliases
Examples
# Create the object with no values
values <- reactiveValues()

# Assign values to 'a' and 'b'
values$a <- 3
values[['b']] <- 4

# From within a reactive context, you can access values with:
values$a
values[['a']]

# If not in a reactive context (e.g., at the console), you can use isolate()
# to retrieve the value:
isolate(values$a)
isolate(values[['a']])

# Set values upon creation
values <- reactiveValues(a = 1, b = 2)
isolate(values$a)
Documentation reproduced from package shiny, version 0.9.1, License: GPL-3

Community examples

Looks like there are no examples yet.