Small wrapper around DT::datatable()
. Will be used to create tables in a
consistent style.
Arguments
- data
A data frame to use within the application.
- rename_vars
An optional named character vector. If provided, it will rename any column names found in this vector to the provided name.
- title
Optional. Character string with the title of the table.
- selection
See
DT::datatable()
. Default set to 'single'.- extensions
See
DT::datatable()
. Default set to 'Scroller'.- dom
See https://datatables.net/reference/option/dom. A div element will be inserted before the table for the table title. Default set to 'fti' resulting in 'f<"header h5">ti'.
- options
See
DT::datatable()
. Must be a list.Modifiable defaults:
scrollY = '400px'
scrollX = TRUE
scroller = TRUE
deferREnder = TRUE
scrollResize = TRUE
scrollCollapse = TRUE
colReorder = TRUE
Non-modifiable defaults:
dom
: Defined by thedom
parameter.initComplete
: Defaults to a function to insert table title into dataTable container.
- allow_listing_download
Logical, whether to allow the user to download the table as an Excel file. Defaults to the
allow_listing_download
configuration option ingolem-config.yml
, but can be overwritten here if needed.- export_label
Character string with the table export label. Only used for downloadable tables (if
allow_listing_download
isTRUE
).- ...
Other optional arguments that will be passed to
DT::datatable()
.
Value
A DT::datatable
object.