title: Captions on tables in pdf documents generated by rmarkdown
body: <p>How can I get captions on my table floats in pdf_document generated by rmarkdown?</p>
  
  <p>Using</p>
  
  <pre><code>output:
    pdf_document:
      fig_caption: true
  </code></pre>
  
  <p>and</p>
  
  <pre><code>```{r, fig.cap='a caption'} 
  myplot 
  ```
  </code></pre>
  
  <p>Generates a floating figure with myplot and the caption specified.</p>
  
  <p>How do I achieve the same thing with tables generated by xtable?</p>
  
  <pre><code>```{r, results='asis', fig.cap='table caption'}
      print(xtable(table), comment = FALSE)
  ```
  </code></pre>
  
  <p>I have tried using floating.environment = 'figure' in print.xtable, but to no avail.</p>