title: Initializing and updating a reactive (data.table) in Shiny?
body: <p>Is there any possibility to inialize a reactive in shiny? 
  I want to a have a reactive data.table. Part of this data.table does not change, so I would not need to reinitialize it every time input changes, but would only need to update columns "original_values" and "working_values". </p>
  
  <p>Is this possible? Or is this a <a href="https://stackoverflow.com/questions/39436713/r-shiny-reactivevalues-vs-reactive">case for better using reactiveValues() with observe()</a>, even though I <a href="https://rpubs.com/The_Great_White_Bryan/150250" rel="nofollow noreferrer">calculate values here and do not have sideeffects</a>?</p>
  
  <pre><code>library(shiny)
  library(data.table)
  
  ui &lt;- fluidPage(
    sidebarLayout(
      sidebarPanel(
        sliderInput("slider1", "Slider 1",min = 0.1, max = 1, value = 0.4, step = 0.05),
        sliderInput("slider2", "Slider 2",min = 0.1, max = 1, value = 0.4, step = 0.05),                               
        sliderInput("slider3", "Slider 3",min = 100, max = 20000, value = 5000, step= 200)
      ), 
      mainPanel(
        tableOutput("tableOut")
  
      )
  
    ))
  
    server &lt;- function(input, output, session){
      rv_dtWeights &lt;- reactive({
  
        #initalization - can this be put somewhere else?
        ret &lt;- data.table(slider_names= c("slider1","slider2", "slider3"), 
                          some_grouping_information=c("A", "A", "B") )
  
        #actual reactive
        ret[,original_values :=c(input$slider1,input$slider2,input$slider3)]
        ret[,working_values:=sum(original_values), by=some_grouping_information]
  
      })
  
      output$tableOut&lt;- renderTable(rv_dtWeights())
  
    }
    shinyApp(ui = ui, server=server)
  </code></pre>