"Next" button in a R Shiny app
<p>I'm trying to build an step by step app using Shiny. My aim is creating an examen consisting in a bunch of questions written in a database. What I need is a "next" button which when you click another question shows up. </p>

<p>I've been triying with an "action button" but it just works the first time, that is, the first time that it is clicked a question shows up, but it becomes unclickable once clicked for first time (it doesn't work as a "next button" as I wish). </p>

<p>Here is the code:</p>

<p>Server.R:</p>

<pre><code>library(xlsx)
data&lt;-read.xlsx("data/base.xlsx",sheetName="Full1")

shinyServer(function(input, output) {

  data[,2]&lt;-as.character(data[,2])

  question&lt;-data[2,2]

  ntext &lt;- eventReactive(input$goButton, {
    question
  })

  output$nText &lt;- renderText({
     ntext()
  })  
})
</code></pre>

<p>ui.R:</p>

<pre><code>shinyUI(pageWithSidebar(
  headerPanel("Exam"),
  sidebarPanel(
    actionButton("goButton", "Next"),
    p("Next Question")
  ),
  mainPanel(
    verbatimTextOutput("nText")
  )
))
</code></pre>

<p>Thank you so much.</p>