| dt2_use_buttons | R Documentation |
Uses the modern DataTables 2.x layout API (not the deprecated dom).
dt2_use_buttons(
options = list(),
buttons = c("copy", "csv", "excel", "print"),
position = "topEnd",
button_class = NULL
)
options |
Options list. |
buttons |
Vector of button ids (e.g., c("copy","csv","excel","print","colvis")). |
position |
Where to place buttons in the layout.
One of |
button_class |
CSS class for buttons (e.g., |
Updated options.
dt2_buttons() for a lower-level variant that takes full button
objects and can relocate the buttons container to a custom CSS selector.
opts <- dt2_use_buttons(list(), buttons = c("copy", "csv", "excel"))
dt2(mtcars, options = opts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.