title: How to extend a table cell across multiple columns when rendered in R Shiny?
body: <p>I have a dataframe of values that I'm attempting to render as a table in R Shiny. There are certain values which I want to extend to take up multiple columns in the same way in which you'd use the HTML  rowspan attribute. However, if I were to do that I'd have to create the whole table from scratch, and I would much prefer to use the DT library for easy conversion from my datatable.</p>
  
  <p>As an example I've created the following script:</p>
  
  <pre><code># ui.R
  
  fluidPage(
    DT::dataTableOutput("table")
  )
  
  # server.R
  
  library(DT)
  
  function(input, output) {
  
    output$table &lt;- DT::renderDataTable({
      df &lt;- data.frame(A = c("Trial 1", 1, 1, 1), B = c("", 1, 1, 1), C = c("", 1, 1, 1),
                       D = c("Trial 2", 2, 2, 2), E = c("", 2, 2, 2), F = c("", 2, 2, 2),
                       G = c("Trial 3", 3, 3, 3), H = c("", 3, 3, 3), I = c("", 3, 3, 3))
  
      DT::datatable(df,
                    options = list(dom = "t",
                                   ordering = FALSE))
    })
  
  }
  </code></pre>
  
  <p>This script renders the following UI:</p>
  
  <p><a href="https://i.stack.imgur.com/Mb4dJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Mb4dJ.png" alt="UI output of above R Shiny app"></a></p>
  
  <p>How can I expand out the cells containing "Trial 1", "Trial 2", and Trial 3" so that they each take up three columns?</p>