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 = TRUEscroller = TRUEdeferREnder = TRUEscrollResize = TRUEscrollCollapse = TRUEcolReorder = TRUE
Non-modifiable defaults:
dom: Defined by thedomparameter.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_downloadconfiguration 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_downloadisTRUE).- ...
Other optional arguments that will be passed to
DT::datatable().
Value
A DT::datatable object.
