<- 'mt_cars'
report_name
::rownames_to_column(mtcars, var = 'car') |>
tibbledatatable(
extensions = 'Buttons',
options = list(
autoWidth = TRUE,
scrollX = TRUE,
pageLength = 6,
dom = 'Bfrtip',
buttons = list(
list(extend = 'copy'),
list(extend = 'csv', filename = report_name),
list(extend = 'excel', filename = report_name),
list(extend = 'pdf', filename = report_name, title = report_name)
)
) )
Tables
Adding interactive DataTables to your Quarto products is easy with the DT
package. There are additional options within DT
that allow for a wide range of DataTable customizations, including buttons that allow users to download underlying data in multiple formats.