title: Shiny data table populated by user input on radio buttons
body: <p>I'm new to Shiny, and trying to create a app in which the the main panel is a tabpanel. The first tab is a conditional panel (these are dictated by the 'criteria' sidepanel selection), and the second tab should be a table representing the highest user-selected radio button options from the conditional panel for each question (e.g., if they select 'Option 1' for 'Question 1' (conditional panel 1) and 'Option 2' for 'Question 2 (conditional panel , Option 2), this should display Question 1 - 2. This information needs to be retained as the user moves through the different criteria on the sidepannel. The issues I'm having are 1. I'm not sure how to retain values based on radio button selection, and 2. I'm not sure how to generate a table that will update to reflect the user input as they work through the criteria.
  Any input would be greatly appreciated.</p>
  <pre><code>ui &lt;- fluidPage(theme = shinytheme(&quot;united&quot;),
                  
                  # Application title
                  titlePanel(&quot;TITLE&quot;),
                  
                  sidebarLayout(
                      sidebarPanel(
                          selectInput(&quot;select&quot;, label =  helpText(&quot;Select a critera&quot;), 
                          choices = list(&quot;Criteria_1&quot;, &quot;Criteria_2&quot;), 
                          selected = c(&quot;NULL&quot;))),
                          
                      
                      mainPanel(tabsetPanel(
                          tabPanel(&quot;Criteria&quot;, conditionalPanel(h3(&quot;Question 1&quot;, align = &quot;left&quot;),
                              condition = &quot;input.select == 'Criteria_1'&quot;,
                              prettyRadioButtons(
                                  inputId = &quot;Id037&quot;,
                                  label = &quot;Predictions:&quot;, 
                                  choices = c(
                                  &quot;Option 1&quot; = 1, 
                                  &quot;Option 2&quot; = 2,
                                  &quot;Option 3&quot; = 3),
                                  inline = TRUE, 
                                  status = &quot;danger&quot;,
                                  fill = TRUE),
                                 
                          ),
                          conditionalPanel(h3(&quot;Question 2&quot;, align = &quot;left&quot;),
                              condition =  &quot;input.select == 'Criteria_1'&quot;,
                              prettyRadioButtons(
                                  inputId = &quot;Id037&quot;,
                                  label = &quot;Hypotheses:&quot;, 
                                  choices = c(
                                      &quot;Option 1&quot; = 1, 
                                      &quot;Option 2&quot; = 2, 
                                      &quot;Option 3&quot; = 3),
                                  inline = TRUE, 
                                  status = &quot;danger&quot;,
                                  fill = TRUE)
                          ),
                       
                                            
  #User side-pannel selection - criteria 2               
                          
                          
  conditionalPanel( h3(&quot;Question 1&quot;, align = &quot;left&quot;),
                    condition = &quot;input.select == 'Criteria_2'&quot;,
                    prettyRadioButtons(
                        inputId = &quot;Id037&quot;,
                        label = &quot;Methods:&quot;, 
                        choices = c(
                            &quot;Option 1&quot; = 1, 
                            &quot;Option 2&quot; = 2),
                        inline = TRUE, 
                        status = &quot;danger&quot;,
                        fill = TRUE)
                    
  ),
  conditionalPanel(h3(&quot;Question 2&quot;, align = &quot;left&quot;),
      condition =  &quot;input.stats == 'Criteria 2'&quot;,
      prettyRadioButtons(
          inputId = &quot;Id037&quot;,
          label = &quot;Paradigm:&quot;, 
          choices = c(
              &quot;Option 1&quot; = 1, 
              &quot;Option 2&quot; = 2, 
              &quot;Option 3&quot; = 3),
          inline = TRUE, 
          status = &quot;danger&quot;,
          fill = TRUE)
  )),
    
                          
                           tabPanel(&quot;Summary score&quot;, DT::renderDT({
                             datatable() %&gt;% formatStyle(
                               'Sepal.Width',
                               backgroundColor = styleInterval(3.4, c('gray', 'yellow'))
                             )
                           })),
                          
                          ))
                  ))
  
                  server &lt;- function(input, output) {
                      
                  }
                  
                  shinyApp(ui, server)
  </code></pre>