title: Adding a row spanning column header to a knitr kable table
body: <p>kableExtra can add header rows with items spanning multiple columns in tables produces with kable</p>
  
  <pre><code>library(tidyverse)
  library(knitr)
  library(kableExtra)
  mat &lt;- matrix(1:4,2,dimnames=list(c("a","b"),c("x","y")))
  mat %&gt;% kable("html") %&gt;% add_header_above(c(" " = 1,"row header" = 2))
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Rstws.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rstws.png" alt="table with row header"></a></p>
  
  <p>I would like to have a column header also, like this:</p>
  
  <p><a href="https://i.stack.imgur.com/agzbR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/agzbR.png" alt="table with row and column header"></a></p>
  
  <p>Can it be done?</p>