View source: R/util_html_table.R
util_html_table | R Documentation |
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,
descs,
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,
title = dl_fn,
messageTop = NULL,
messageBottom = NULL
)
tb |
the table as data.frame |
filter |
passed to |
columnDefs |
column specifications for the |
autoWidth |
passed to the |
hideCols |
columns to hide (by name) |
rowCallback |
passed to the |
copy_row_names_to_column |
add a column 0 with |
link_variables |
considering row names being variables, convert row names to links to the variable specific reports |
tb_rownames |
number of columns from the left considered as row-names |
meta_data |
the data dictionary for labels and similar stuff |
rotate_headers |
rotate headers by 90 degrees |
fillContainer |
see |
... |
passed to |
colnames |
column names for the table (defaults to |
descs |
character descriptions of the columns for the hover-box shown
for the column names, if not missing, this overrides
the existing description stuff from known column
names. If you have an attribute "description" of the |
options |
individually overwrites defaults in |
is_matrix_table |
create a heat map like table without padding |
colnames_aliases2acronyms |
abbreviate column names considering being analysis matrix columns by their acronyms defined in square. |
cols_are_indicatormetrics |
logical cannot be |
label_col |
label col used for mapping labels in case of
|
output_format |
target format |
dl_fn |
file name for downloaded table – see https://datatables.net/reference/button/excel |
rotate_for_one_row |
logical rotate one-row-tables |
title |
character title for download formats, see https://datatables.net/extensions/buttons/examples/html5/titleMessage.html |
messageTop |
character subtitle for download formats, see https://datatables.net/extensions/buttons/examples/html5/titleMessage.html |
messageBottom |
character footer for download formats, see https://datatables.net/extensions/buttons/examples/html5/titleMessage.html |
the table to be added to an rmd
/´html
file as
htmlwidgets::htmlwidgets
util_formattable()
Other summary_functions:
prep_combine_report_summaries()
,
prep_extract_classes_by_functions()
,
prep_extract_summary()
,
prep_extract_summary.dataquieR_result()
,
prep_extract_summary.dataquieR_resultset2()
,
prep_render_pie_chart_from_summaryclasses_ggplot2()
,
prep_render_pie_chart_from_summaryclasses_plotly()
,
prep_summary_to_classes()
,
util_as_cat()
,
util_extract_indicator_metrics()
,
util_get_category_for_result()
,
util_get_colors()
,
util_get_html_cell_for_result()
,
util_get_labels_grading_class()
,
util_get_message_for_result()
,
util_get_rule_sets()
,
util_get_ruleset_formats()
,
util_get_thresholds()
,
util_melt_summary()
,
util_sort_by_order()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.