View source: R/govuk_datatable.R
govuk_datatable | R Documentation |
govuk_datatable
is a wrapper for DT::datatable()
that will enable the
govuk-hugo theme to apply GOV.UK CSS classes to the output.
govuk_datatable( data, title = NULL, element_id = NULL, col_names = NULL, page_length = 10, search = FALSE, small_text = FALSE, buttons = TRUE, col_defs = NULL, copy_info = NULL, export_file = NULL, options = NULL )
data |
the data frame to display |
title |
a title/caption for the table |
element_id |
optionally, an id for the resulting HTML chunk |
col_names |
optionally, a vector of column names, otherwise the names of the data object |
page_length |
the number of rows to show per page, default is 10 |
search |
whether to include the search box |
small_text |
whether to render the table content with a smaller font |
buttons |
whether to include copy and download buttons |
col_defs |
optionally, a list of column definitions |
copy_info |
information to include when copying the file |
export_file |
the file name for the exported csv |
options |
optionally, a list of additional options to pass to |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.