4

I'm trying to make a table that has both shows entries and buttons so my peers can export the data from the table.

At first when I added the tables it covered the "Show Entries" section that is usually on the top left. So I wrote this CSS code which moved the buttons to the center of the table but my "Show Entries" section is still empty.

Here is my Rmarkdown code


output: html_document

```{r}  

library(readr)
library(DT)

mtcars <- mtcars


    
  
```{css echo=FALSE}

.dataTables_wrapper .dt-buttons {
  float:none;  
  text-align:center;
}
datatable(mtcars,
          extensions = 'Buttons', options = list(
            dom = 'Bfrtip',
            buttons = c('copy','excel', 'pdf')
          )
) 

This is what loads for me enter image description here

How can I add the "Show Entries" feature?

enter image description here

RL_Pug
  • 697
  • 7
  • 30

1 Answers1

6

Use dom = 'Blfrtip' instead of dom = 'Bfrtip'

ViviG
  • 1,613
  • 1
  • 9
  • 23