title: R DataTables do not display Buttons and Length Menu simultaneously
body: <p>When you click the DataTable 1 tab, you can see the Length Menu at the top which is the main point of this question. The bit starting with <code>output$ex1</code> in the server codes up this data table.</p>
  
  <p><a href="https://i.stack.imgur.com/yhKuj.png" rel="noreferrer"><img src="https://i.stack.imgur.com/yhKuj.png" alt="enter image description here"></a></p>
  
  <p>Actually I would like to have buttons for both column visibility and downloading the data. A little modification to the <code>output$ex1</code> by adding <code>buttons</code> argument
  is required. Then, you end up with <code>output$ex2</code>. But now I miss the Length Menu.</p>
  
  <p><a href="https://i.stack.imgur.com/dRaBY.png" rel="noreferrer"><img src="https://i.stack.imgur.com/dRaBY.png" alt="enter image description here"></a>   </p>
  
  <p>I thought adding <code>pageLength = 5, lengthMenu = c(5, 10, 15, 20)</code> to the <code>output$ex2</code> as can be seen in the code starting with <code>output$ex3</code> would solve this issue and I can have the Length Menu back. But third one returned me exactly the same table as the second one.  </p>
  
  <p><a href="https://i.stack.imgur.com/3vhcC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/3vhcC.png" alt="enter image description here"></a></p>
  
  <p>1) How can I have both the buttons and the Length Menu?</p>
  
  <p>2) How can I arrange the positions of the buttons? For example, I would like the buttons for the colvis to be above the buttons for downloading.</p>
  
  <p>3) When you look at the code below, you see that excel is also included in the buttons: <code>buttons = c('colvis', 'copy', 'csv', 'excel', 'pdf', 'print')</code> 
  But in none of the last 2 tables can you see the button for excel.
  Additionally, I do not receive an error for that. </p>
  
  <p>I would appreciate any help.</p>
  
  <pre><code>library(shiny)
  
  ui &lt;- navbarPage(
    title = 'DataTable Options',
    tabPanel('DataTable 1',  DT::dataTableOutput('ex1')),
    tabPanel('DataTable with Buttons 1',  DT::dataTableOutput('ex2')),
    tabPanel('DataTable with Buttons 2',  DT::dataTableOutput('ex3'))
  )
  
  
  
  server &lt;- function(input, output) {
  
  
    output$ex1 &lt;- DT::renderDataTable(
           DT::datatable(iris, 
                class = 'cell-border stripe', 
                filter = 'top',
                options = list(autoWidth = TRUE)))
  
  
  
    output$ex2 &lt;- DT::renderDataTable(
           DT::datatable(iris, 
                class = 'cell-border stripe', 
                filter = 'top', extensions = 'Buttons', 
                options = list(autoWidth = TRUE, 
                               dom = 'Bfrtip', 
                               buttons = c('colvis', 'copy', 'csv', 'excel', 
                                           'pdf', 'print'))))
  
  
     output$ex3 &lt;- DT::renderDataTable(
        DT::datatable(iris, 
                class = 'cell-border stripe', 
                filter = 'top', extensions = 'Buttons', 
                options = list(autoWidth = TRUE, 
                               pageLength = 5, lengthMenu = c(5, 10, 15, 20), 
                               dom = 'Bfrtip', 
                               buttons = c('colvis', 'copy', 'csv', 'excel', 
                                           'pdf', 'print'))))
  
  
    }
  
  
    shinyApp(ui = ui, server = server)
  </code></pre>