title: R shiny eventReactive button subsets dataframe based on selected checkboxgroup
body: <p>This question extends from <a href="https://stackoverflow.com/questions/34396403/r-shiny-isolate-reactive-data-frame">another question</a> that correctly explains how to use a button to subset a dataframe based on a slider.</p>
  
  <p>I need a bit more specific help with my real problem.</p>
  
  <p>I have a function "transition_matrix" in my server.R that takes 2 inputs: (a) a <strong>dataframe</strong> containing product information and (b) a <strong>date</strong>. I pre-load the dataframe as fixed but then allow the user to change the date. So, when the user changes the date, the function executes for the given dataframe and the selected date.</p>
  
  <p>The code thus far:</p>
  
  <p><strong>server.R</strong></p>
  
  <pre><code>shinyServer(function(input, output) {
  
    bigmatrix &lt;- reactive({
      transition_matrix(capital_summary_cum, ceiling_date(as.Date(input$datebox),"month")-1)
    })
  
  output$balance_matrix &lt;- renderTable({
      balances_ &lt;- bigmatrix()[1:(default_state +2),] %&gt;%
        round(digits = 0) %&gt;% 
        format(big.mark = ",") 
  
    transition_matrix &lt;- function(df1, date1){
      date2 &lt;- ceiling_date(as.Date(AddMonths(date1,1)),"month")-days(1)
      ...
      ...
  </code></pre>
  
  <p>What I want to do next is to allow the user to subset the dateframe as well. To do this I offer a group of checkboxes which represent products. So, in addition to the date, the user can also select a subset of products on which to perform the aforementioned function.</p>
  
  <p>The problem is that the function takes approx 1.5 seconds to execute, so each time the user will check a box (of which there are approx 40) the function will be called creating an unwanted 1.5 sec delay. </p>
  
  <p>I rather want to isolate (?) the checkboxes to allow the user to select the desired list of products until a button is clicked. Once the button is clicked I want to subset the dataframe based on the selected checkboxes, and only then feed this into the function. I really would like the date input to remain "fully reactive" so that i don't have to press the button each time the date is also changed.</p>
  
  <p><strong>How can I add a button that will subset my dataframe based on selected checkboxes and automatically call the function with the selected date?</strong></p>