How to remove an element from reactiveValues ​​in brilliant?

How to remove an element from reactiveValues ​​()

For example, when I run the code:

library(shiny)

runApp(list(
  ui=tableOutput("table1"),
  server=function(input, output, session) {
    values <- reactiveValues(val1 = 1, val2 =2, val3 = 3)
    values$val1 <- NULL

    output$table1 <- renderPrint(reactiveValuesToList( values) )
  }))

Conclusion:

$ val1 NULL $ val2 [1] 2 $ val3 [1] 3

Instead:

$ val2 [1] 2 $ val3 [1] 3

Thank!

+4
source share

Source: https://habr.com/ru/post/1664322/


All Articles