title: Shiny check reactiveValue existence with validate -- Not Found
body: <p>I have a shiny code like in the below. I need to define variables as reactiveValues to be updatable (or I could define them I think as global but then I have to press clean objects from Rstudio which is not very user-friendly).I try to run a validate code to check for existence of the data I have defined as reactiveValues. validate(need(exists("GSEmRNA$d"),message="Dataframe not found")) yields "Dataframe not found" thus, does not plot my boxplot. If I define them as global variables and forget to press clean objects, code might mix up as old data can be passed as if it is new. Any help is appreciated. </p>
  
  <p>server.R </p>
  
  <pre><code>shinyServer(function(input, output) {
    observeEvent(input$GoButton,{
      dataset &lt;- data.frame(first= c(1,5,9),second=c(8,5,13), third=c(10,3,17))
      GSEmRNA &lt;- reactiveValues(d=dataset)
    })
    output$BoxplotDataset &lt;- renderPlot({
      if (input$GoButton== 0) {return()}       
      else{
        validate(need(exists("GSEmRNA$d"),message="Dataframe not found"))
        boxplot(GSEmRNA$d)}
    })
  })
  </code></pre>
  
  <p>ui.R</p>
  
  <pre><code>library(shiny)
  shinyUI(pageWithSidebar(
  headerPanel("Dataset Selection"),
  
  sidebarPanel(
  
    actionButton("GoButton","GO")
  
  ),
  mainPanel(
    wellPanel(
      column(8, plotOutput("BoxplotDataset")
    )
  )
  )))
  </code></pre>
  
  <h2>FOR THE RECORD, I ALSO POSTED THIS QUESTION TO SHINY GOOGLE DISCUSS GROUP <a href="https://groups.google.com/forum/#!topic/shiny-discuss/ZV5F6Yy-kFg" rel="nofollow">https://groups.google.com/forum/#!topic/shiny-discuss/ZV5F6Yy-kFg</a></h2>