values <- reactiveValues(A=1)
reactiveB <- reactive({
values$A + 1
})
# Can use quoted expressions
reactiveC <- reactive(quote({ values$A + 2 }), quoted = TRUE)
# To store expressions for later conversion to reactive, use quote()
expr_q <- quote({ values$A + 3 })
reactiveD <- reactive(expr_q, quoted = TRUE)
# View the values from the R console with isolate()
isolate(reactiveB())
isolate(reactiveC())
isolate(reactiveD())
Run the code above in your browser using DataLab