Adds a table to a webpage, based on specified or selected variables.
Usage
output_table(variables = NULL, dataset = NULL, dataview = NULL,
id = NULL, click = NULL, subto = NULL, options = NULL,
features = NULL, filters = NULL, wide = TRUE, class = "compact",
datatables = TRUE)Arguments
- variables
The ID of a variable selecting input, or a list specifying columns (if
wideisTRUE) or included variables. Each entry should be a list with at least have anameentry with a variable name. Atitleentry can be used to set a different display name for the variable.namecan also refer to feature names, which can be specified with asourceentry set to"features". For example,list(title = "Variable A", name = "a", source = "features"). A vector can also be used to specify variable names, with names setting titles (e.g.,c("Variable A" = "a")). If not specified, sources are attempted to be resolved automatically.- dataset
The name of a dataset, or ID of a dataset selector, to find
variablesin; used ifdataviewis not specified.- dataview
The ID of an
input_dataviewcomponent.- id
Unique ID of the table.
- click
The ID of an input to set to a clicked row's entity ID.
- subto
A vector of output IDs to receive hover events from.
- options
A list of configuration options if
datatablesisTRUE, see DataTables Documentation; otherwise, only thescrollYoption has an effect.- features
A list of features columns to include if multiple variables are included and
wideisTRUE.- filters
A list with names of
metaentries (fromvariableentry indata_add'smetalist), and values of target values for those entries, or the IDs of value selectors.- wide
Logical; if
FALSE, variables and years are spread across rows rather than columns. Ifvariablesspecifies a single variable,wide = FALSEwill show the variable in a column, andwide = TRUEwill show the variable across time columns.- class
Class names to add to the table.
- datatables
Logical; if
TRUE, uses DataTables.