title: Select columns instead of rows in shiny with DT::datatable
body: <p>I am building a Shiny gadget and I want to select columns instead rows in a DT::datatable. At <a href="https://rstudio.github.io/DT/shiny.html" rel="nofollow">the documentation</a> it is said that it should be done in the following way. (It is also applied in <a href="https://rstudio.github.io/DT/shiny.html" rel="nofollow">this example</a>.) </p>
  
  <pre><code>library(shiny); library(DT)
  
  ui &lt;- bootstrapPage(
    DT::dataTableOutput('iris')
  )
  
  server &lt;- function(input, output, session) {
    output$iris &lt;- DT::renderDataTable(
      iris, selection = list(target = 'column')
    )
  }
  
  shinyApp(ui, server)
  </code></pre>
  
  <p>However this throws the following error <code>Error in match.arg: 'arg' must be NULL or a character vector</code>. This makes sense if we look in the documentation of <code>datatable()</code>, it states that <code>selection</code> should be a character ("the row selection mode (single or multiple selection or disable selection) when a table widget is rendered in a Shiny app").</p>
  
  <p>So how should I allow for selecting columns instead of rows? Thanks in advance.</p>