title: How to change alignment of columns in datatable in r shinydashboard?
body: <p>I am creating a dataTableOutput in a shiny dashboard. All the columns are left aligned by default and I want to change it to center align. I am using the following code in my server.R file for the same:</p>
  
  <pre><code>output$data&lt;- renderDataTable({data()},
                              options = list(
                               columnDefs = list(list(className = 'dt-center', targets = '_all'))))
  </code></pre>
  
  <p>This code is not showing any error but the alignment is not changing. I have searched a lot but the only way to do this seems to be the one I am using. Is there any way to change the alignment? Any help would be appreciated. TIA</p>