The jack of all trades device for tables
util_html_table(
tb,
filter = "top",
columnDefs = NULL,
autoWidth = FALSE,
hideCols = character(0),
rowCallback = DT::JS("function(r,d) {$(r).attr('height', '2em')}"),
copy_row_names_to_column = !is.null(tb) && length(rownames(tb)) == nrow(tb) &&
!is.integer(attr(tb, "row.names")) && !all(seq_len(nrow(tb)) == rownames(tb)),
link_variables = TRUE,
tb_rownames = FALSE,
meta_data,
rotate_headers = FALSE,
fillContainer = TRUE,
...,
colnames,
options = list(),
is_matrix_table = FALSE,
colnames_aliases2acronyms = is_matrix_table && !cols_are_indicatormetrics,
cols_are_indicatormetrics = FALSE,
label_col = LABEL,
output_format = c("RMD", "HTML"),
dl_fn = "*",
rotate_for_one_row = FALSE
)
the table to be added to an rmd
/´html
file as
htmlwidgets::htmlwidgets
the table as data.frame
passed to DT::datatable
column specifications for the datatables
JavaScript
object
passed to the datatables
JavaScript library
columns to hide (by name)
passed to the datatables
JavaScript library
(with default)
add a column 0 with rownames
considering row names being variables, convert row names to links to the variable specific reports
number of columns from the left considered as row-names
the data dictionary for labels and similar stuff
rotate headers by 90 degrees
see DT::datatable
passed to DT::datatable
column names for the table (defaults to colnames(tb)
)
individually overwrites defaults in options
passed to DT::datatable
create a heat map like table without padding
abbreviate column names considering being analysis matrix columns by their acronyms defined in square.
logical cannot be TRUE
,
colnames_aliases2acronyms
is TRUE
. cols_are_indicatormetrics
controls, if the columns are really function calls or, if
cols_are_indicatormetrics
has been set to TRUE
, the columns are
indicator metrics.
label col used for mapping labels in case of
link_variables
is used (that argument set to TRUE
and
Variables
or VAR_NAMES
in meta_data
)
target format RMD
or HTML
, for RMD
, markdown will
be used in the output, for HTML
, only HTML
code is being generated
file name for downloaded table -- see https://datatables.net/reference/button/excel)
logical rotate one-row-tables
util_formattable()