title: Shiny update a table with an action button
body: <p>Here is the relevant code for my Shiny App. Let me know if any additional code is needed. I am able to use the same method to render a plot but I am running into an error when trying to render a table.</p>
  
  <p><strong>UI:</strong></p>
  
  <pre><code>actionButton("do", "Test!"),
  
  fluidPage(
        tableOutput('table1')
  ),
  </code></pre>
  
  <p><strong>Server</strong> </p>
  
  <pre><code>   globals &lt;- reactiveValues(
      mydf = dat
     )
  
     count &lt;- eventReactive(input$do, {  
      filter_mk &lt;- input$mk
      filter_date &lt;- input$date
      filter_universe &lt;- input$universe
  
      dat_f &lt;- globals$mydf %&gt;% filter(date &gt;= filter_date &amp; universe %in% filter_universe &amp; mrkcp_buckets %in% filter_mk)
  
      count &lt;- dat_f %&gt;%
        group_by(date) %&gt;%
        count()  %&gt;%
        rename(st = n) %&gt;%
        group_by(strftime(date, "%Y-%m")) %&gt;%
        filter(date == max(date)) %&gt;%
        ungroup() %&gt;%
        select(`strftime(date, \"%Y-%m\")`, st) %&gt;%
        spread(`strftime(date, \"%Y-%m\")`, st)  %&gt;%
        .[seq(1, length(.), 3)]
  
  })
  
  output$table1 &lt;- renderTable({
    count()
  }, caption= "Test",
  caption.placement = getOption("xtable.caption.placement", "top")
  )
  </code></pre>
  
  <p>However, when I press the "Test" button, I am getting the following error: Error in count: unused argument (.). Wondering if I am missing something simple.</p>
  
  <p>I also can not do <code>observeEvent(input$do, {output$table2 &lt;- renderTable({.})</code> do to some other constraints that I did not show as an attempt at brevity. </p>