Can you change the R default table length when outputting with the DT package?

Viewed 1138
2 Answers

You can change it to 3 by datatable(mtcars, options = list(dom = 't', pageLength = 3)).

This will get you your desired results:

datatable(mtcars, options = list(dom = 't',
  lengthMenu = list(c(25, 100, -1), c('25', '100', 'All')),
  pageLength = 25
))
Related