title: Rebuild dataframe using submitButton in shiny
body: <p>I have a data-frame which is obtained after some processing. In this data-frame the user needs to choose certain criteria which the user wants    to go ahead for further processing. For this there is an add button which when clicked by the user will take out the data according to the selected criteria and append to a new data frame. This new frame then goes ahead for further processing. What I seem to be stuck at is I cannot make shiny add a data-frame to another data frame when Add button is pressed. I have provided the code below. Any help will be greatly appreciated.</p>
  
  <pre><code>ui.R
  library(shiny)
  
  
  shinyUI(pageWithSidebar(
    headerPanel('Testing'),
    sidebarPanel(
      conditionalPanel(
      condition="input.tabs1=='Observe Data'",
      uiOutput("item"),
      actionButton("add", "Add"))
    ),
    mainPanel(
      tabsetPanel(id ="tabs1",
                  tabPanel("Observe Data",verbatimTextOutput("Data_table")),
                  tabPanel("Final Table",verbatimTextOutput(outputId='plot'))
  
      )
  
    )
  ))
  
  server.R
  
  library(shiny)
  library(dplyr)
  
  chosen_category&lt;-data.frame()
  shinyServer(function(input, output) {
    data&lt;-data.frame(Names=c("A","A","A","B","B","B","C","C","A"),Values=c(1,2,3,4,5,654,3,2,2))
  
    output$item&lt;-renderUI({
      selectInput("category","Categories",as.character(unique(data$Names)))
    })
    filtdata&lt;-reactive({
      p&lt;-data
      p_filt&lt;-data%&gt;%
        filter(Names %in% input$category)
      p_filt
    })
  
    output$Data_table&lt;-renderPrint({
      filtdata()
    })
  
    observe({
      input$add
      chosen_category &lt;&lt;- rbind(chosen_category, filtdata())
    })
  
    final_data &lt;- reactive({
      chosen_category
    })
  
  
  
  }) 
  </code></pre>