Skip to contents

Build a tabxplor_tab around fmt columns

Usage

new_tab(
  tabs = tibble::tibble(),
  subtext = "",
  test = new_test_tibble(),
  chi2 = NULL,
  meta = NULL,
  ...,
  class = character()
)

new_grouped_tab(
  tabs = tibble::tibble(),
  groups,
  subtext = "",
  test = new_test_tibble(),
  chi2 = NULL,
  meta = NULL,
  ...,
  class = character()
)

Arguments

tabs

A table, stored into a tibble data.frame. It is generally made with tab, tab_reg or tab_plain.

subtext

The footer's text, as a template: one element per line, every <placeholder> tabxplor generates and every line you write, in the order they print. See set_subtext.

test

A tidy tibble storing whole-table test results (Chi2 for factor columns, ANOVA F for mean columns), filled by tab_chi2.

chi2

[Deprecated] Soft-deprecated alias of test.

meta

The table's metadata, as a single named list gathering (all optional, NULL when unset):

  • spec — the table's identity, list(kind =, vars =, call =): its kind ("crosstab" or "regression"); vars, what no column can carry (the weight, the caption, the outcomes, the variable labels — see set_caption), the rest of the variable model being derived from the declared index columns and from the columns' own col_var; and call, the producer's own recipe (a regression's model record — family, outcome, predictors, reference level, and the fit_spec reg_check_plots refits from).

  • render_extras — display-only intent for the base count and the add_pct companion, list(n =, add_pct =), materialised at print/export time rather than baked into the table.

  • empirical_tips — multinomial crude-companion tooltip data (a tibble keyed by column, predictor and level), set by tab_reg(empirical = TRUE).

  • assumptions — one record PER OUTCOME, keyed by it, each holding the observed curve of every continuous predictor (weighted quantile bins of the outcome on the family's link scale, one block per tab_vars group), set by tab_reg: the data behind the shape table under the footer, and behind reg_check_plots's linearity panel.

  • color_breaks — a per-table override of the colour break scales, set by tab(color_breaks =) and merged over the global option (set_color_breaks) at render time.

  • legend_words — what this table's colour legend CALLS each measure — naming only, never a number (see set_legend_words).

  • footer_tabs — the tables and notes rendered UNDER this one by every medium, set by set_footer_tabs: a tabxplor_tab renders as a table, any other data.frame as a grey note (tab_note). In the console they print ABOVE the table, so the last thing printed is the object you can go on to pipe. A footer table's own are never rendered.

  • bars — the columns drawn as data bars in html and in Excel, each named with the ceiling a full bar means (NA = the column's own largest data cell, so that one reference serves the whole column — set_bars).

meta sub-fields left NULL are dropped, so a table given nothing carries no attribute.

...

Needed to implement subclasses.

class

Needed to implement subclasses.

groups

The grouping data.

Value

A tibble of class tabxplor_tab.

A tibble of class tabxplor_grouped_tab.