title: Accessing values inside eventReactive
body: <p>I need help with a basic Shiny question. My goal is to make a simple math quiz app (What is 4 x 4?). I want to create values with one button, select a numeric answer, and then press another answer button. My problem is that i cannot find a way to access the values that are stored inside eventReactive. I have simplified the problem in the code below. The goal of this app is to ask for a number, and then to supply it. Thank you in advance!</p>
  
  <pre><code># Goal: Fetch a number, then input that number, then receive paste("correct")/paste("incorrect)
  
  ui &lt;- fluidPage(
        textOutput(outputId = "out"),
  
        numericInput(inputId = "inn",
                 label = "",
                 value = 0),
  
    actionButton("answer", "Answer"),
    actionButton("question", "New Question"),
  )
  
  
  
  
  server &lt;- function(input, output) {
  
    data &lt;- eventReactive(input$question,{
  
      a &lt;- sample.int(10,1)
  
      paste("Enter",a)
  
      })
  
    output$out &lt;- renderText({data()})
  
  }
  
  shinyApp(ui,server)
  </code></pre>