Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide the default parts of a DT:: Datatable

Tags:

r

dt

Is there a way to hide specific parts of a DT:: Datatable? I mean "Show Entries", "Search","Showing to of entries", "Previous" "Next". I guess that the way of hiding one of those can be applied to the rest of them.

library(DT) 
datatable(
  mtcars, 
  options = 
    list(language = 
           list(paginate = 
                  list('next'="NEXT PAGE", 
                       previous="PREVIOUS PAGE"), 
                info = "These are entries _START_ to _END_ of _TOTAL_ total entries",
                lengthMenu = "Display _MENU_ entries",
                search = "Search box"
           )
    )
)
like image 702
firmo23 Avatar asked Nov 30 '25 02:11

firmo23


1 Answers

Use the following options to enable/disable features of DataTables:

  • info : table information display field
  • paging : table pagination
  • searching : search (filtering) abilities
library(DT)

datatable(
  mtcars, 
  options = list(
    info = FALSE,
    paging = FALSE,
    searching = FALSE
  )
)

See http://datatables.net/reference/option/ for more options.

like image 169
Darren Tsai Avatar answered Dec 02 '25 16:12

Darren Tsai