title: Preserve row/column labels from table() using kable and knitr
body: <p>The <code>table</code> function in base R adds nice row/column labels, but when I use <code>knitr::kable</code> these go away. Any simple way to keep these, aside from adding them on the html/markdown side?</p>
  
  <p>Reproducible example:</p>
  
  <pre><code>library(knitr)
  
  # reproducibility
  set.seed(123) 
  
  # here's a df
  some_data &lt;-
    data.frame(a=sample(c('up','down'), 10, replace=T),
               b=sample(c('big','small'), 10, replace=T))
  
  # using table() you get nice labels ('a' and 'b', in this case)
  table(some_data)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/WPDKh.png" alt="enter image description here"></p>
  
  <pre><code># that goes away with kable, in either markdown or html format (I care about html)
  kable(table(some_data))
  kable(table(some_data), format='html')
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/2X5bR.png" alt="enter image description here"></p>