Changelog
Source:NEWS.md
tabxplor 2.0.1
New features
The footer under a table is a template you can edit. Everything printed there — the weight line, the colour legend, the significance-stars key — is a
<placeholder>in the table’ssubtext, and everything you write is a line: the order of the lines is the order of the footer.get_subtext()shows it,set_subtext()replaces it, and dropping<legend>drops the legend, in the console too.set_legend_words()re-states what that legend calls a measure, for a table grading the same ladder on another quantity. See?tabxplor-footer.A note, or a second table, under a table.
set_footer_tabs()takes atabxplor_taband renders it as a table, or any other data.frame and renders it as a grey note;tab_note()sets that note’s headers, alignment and footnote.Data bars.
set_bars()draws a bar chart inside the table — in html and in Excel — scaled to the column’s own largest data cell, or to a ceiling you state.options(tabxplor.print = "md"). A bare table prints as markdown instead of in the console or the Viewer, which is what a Quarto or R Markdown notebook knitted without pandoc needs.A wide html table scrolls instead of widening the page, in a document, on a pkgdown site, in the Viewer and in jamovi alike. Its title stays outside the box, and printing lifts the clip.
tab_html(cells = )— write back whatget_data = TRUEreads. Hand back the same data.frame with some cells edited and each edit is written verbatim into its<td>, keeping the cell’s colours, alignment and tooltip. This is the supported way to splice an input box, a link or a badge into a tabxplor table.The jamovi module is now built for macOS (Apple silicon and Intel), Windows and Linux, on both jamovi lines, and published as downloadable files. It is installed by sideloading, not from jamovi’s library: the procedure and the links are in the README and on the package website.
Minor improvements and fixes
Two bugs with weighted data, both silent. A variable whose name is not syntactic (
Age group,Household weight) broke every formula built from names: withdesign_effect = TRUEthe design-based tests returnedNAwith no message, andtab_reg(wt = )stopped on a parse error.A
subtextwritten by a user is escaped in html. It is now shown, never executed — which matters for a table shared inside jamovi, where an html result can run scripts.Significance stars are now
.05/.01/.001, the discipline’s usual scale, instead of.10/.05/.01. At the default confidence level a greyed cell can therefore no longer carry a star.display = "odds"prints the odds behind a percentage — the middle rung between a percentage and an odds ratio.Options set in
.Rprofileare no longer overwritten when the package loads.tabxplor.printandtabxplor.themeset beforelibrary(tabxplor)now hold.A regression’s multiplicative count measure is named
RoM(ratio of means) rather thanIRR, so a column is headedModel_RoM;measure = "IRR"is still accepted.The weight footer no longer mentions intervals and tests that are not in the table: a weighted table showing none of them prints only “Weighted by
<wt>.”A
col_varspan header is wrapped and compacted like every other header. It was the one header no rule owned, so a long variable name widened the whole block. One visible consequence: its spaces are now narrow no-break spaces in html, as every other header’s already were — code that matches a span’s text literally has to allow for that.A host table and its subordinate share one footer, instead of printing the colour legend twice in html and not at all in the console.
French translations: every multiplicative comparison that is not an odds ratio now reads ratio, and six mistranslated strings that were printing in English are fixed.
tabxplor 2.0.0
CRAN release: 2026-08-29
New features
-
tab()is the unified entry point. It takes severalrow_varsandcol_vars, merged into one table or returned as a list withoutput_list = TRUE, and composes withtab_vars;col_vars = a*bcrosses two column variables.tab_many()is a soft-deprecated alias. -
tab_reg()— colour-coded regression tables (linear, logistic, Poisson, multinomial, ordinal), on weighted and survey data, with model comparison, marginal effects and every export format. Its estimand is a cascade,family→link→measure→effect. Seevignette("tabxplor-reg").-
Every modelled effect sits beside its observed (crude) counterpart — the same quantity fitted with one predictor instead of all of them — so what adjustment changed is read across the table.
color = "adjustment"colours that gap and tests it;empirical = FALSEturns it off. -
Every regression table checks itself: linearity, proportional odds, dispersion, influence and collinearity, one footer row per model.
shape =is the cure — fit a continuous predictor as quantile groups, a curve, or a log / sqrt transformation. -
jamovi: a new “Regression models” analysis (
jmvtabreg); Crosstables gains a reference-level picker, level merging, export, tooltips and the new options, each named after its R argument.
-
Every modelled effect sits beside its observed (crude) counterpart — the same quantity fitted with one predictor instead of all of them — so what adjustment changed is read across the table.
-
tab_counts()builds a full colour-coded table from already-aggregated counts instead of microdata.forest_plot()draws any tabxplor table as estimates with their intervals, stars and own cell colours, returning a modifiableggplot;reg_check_plots()draws the model checks. -
Weights and survey designs. Pass a
survey::svydesign()asdataand strata, clusters,fpcand calibration reach every interval, test and colour;options(tabxplor.design_effect = TRUE)does the same, exactly, for a plain weight column. A weighted table’s footer states its basis. -
Correct confidence intervals, asymmetric where they should be (Wilson, Newcombe, Welch, Katz), chosen with one named vector
ci_method = c(cell =, diff =, mean_diff =, mean_ratio =).cisays only where the interval sits; significance stars are opt-in (stars =) and read that interval. -
Whole-table tests: an effect size (Cramér’s V, phi, eta²), Fisher’s exact on a sparse table, a one-way ANOVA for mean columns, and Haberman’s adjusted residual behind
color = "contrib". -
Redesigned colour API. Position picks the visual channel (1st value → text, 2nd → background),
color = TRUEis the smart per-column-type default, and every ladder is the same ladder written in another measure, so a shade means the same deviation whichever measure a table is read on. OKLCH palettes,set_color_palette(),color_breaks, atheme = "auto"dark mode, and black-and-white publication palettes (theme = "print_ready") saying it all typographically. -
One display grammar for both producers. Named layouts (
"est","est_ci","est_base", …) built on{}tokens —display = "{pct} (n={n})"— where{est}is whatever the column estimates and{base}the level it sits on. It is post-hoc:set_display()on a finished table gives the same table as asking at build time. Every cell of a percentage table now carries its odds ratio, anddisplay = "odds"prints the odds it is a ratio of. -
shape =decides how a number enters a table: quantile groups, bands at the mean and one standard deviation either side, one level per value, or a"log"/"sqrt"transformation. A numericrow_vars/tab_varsis grouped rather than exploded; a mean cell shows49 (cv 36%). -
New
tab()arguments:-
spread_vars(each level of a sub-table variable becomes a block of columns, with oneTotalrow and onencolumn per block) -
n = c("range", "min", "no")(how many people the table is about) -
n_min,common_totrowandna = "common_base".
-
-
tab_export()is one entry point for every format, andtab_html()(the new name fortab_kable()) renders through a new dependency-free engine, about 3× faster and restylable because its geometry is CSS classes;tab_css()writes one stylesheet for a whole document. Also new:options(tabxplor.print = "html")with hover tooltips,caption =,transpose = TRUE. -
Excel export moved to
openxlsx2: a ratio stays a real number that sorts and filters while printing1/2.11, column widths fit their content, a secondary number becomes a column of its own, andtab_xl(check = "auto")draws the model-check plots under a regression table. -
Introspection accessors.
tab_structure()says what a table is and what can be done with it,tab_columns()what every numeric column estimates and how it is coloured,fmt_attr()any one column fact by name,reg_measures()andreg_formulas()the same for models. -
as.matrix()andas.table()hand a table to base R — the numbers as a plain matrix, or a basetablewith named dimnames — dropping the totals and the display-time rows, because a correspondence analysis or a chi-squared test run on a table’s own margins is wrong:FactoMineR::CA(as.matrix(tab(gss_cat, race, marital))). -
French translations of every legend, footer and message (
options(tabxplor.lang = "fr"), alang =argument, or the locale), on a bilingual pkgdown website. Labelled data (haven): value labels become factor levels. Parallel builds withoptions(tabxplor.parallel = TRUE).
Changes that may affect existing code
-
Dependencies reshuffled.
magrittr/stringr/crayonare dropped, so%>%is no longer re-exported — use the base|>pipe.kableExtraandDescToolsmove to Suggests, Excel export fromopenxlsxtoopenxlsx2, andsurvey/nnet/MASSbecome hard dependencies. -
The base count,
add_pctand the chi-squared / ANOVA p-values are drawn at display time, not stored as columns and rows. Read them withTotal$nandget_test(). - For numeric (mean) columns the
difffield is a real difference, the cell/reference ratio moving toratio, and a cell shows a coefficient of variation instead of a standard deviation; a numericrow_vars/tab_varsis grouped rather than exploded.shape = "values_to_levels"anddisplay = "mean_sd"restore the old output exactly. -
tab(na = "drop")with severalcol_varsdrops each column’s own missing values (the old shared base is nowna = "drop_all"). -
The colour thresholds moved for
pct_ratio,mean_ratioandmean_diff, and the background channel keeps the two ratio scales’ loudest rungs only.set_color_breaks()restores any of them. -
A weighted table’s whole-table test and effect size are computed on the weighted table (only those two were still unweighted), Fisher’s exact is skipped under weights, and
color = "contrib"significance reads the adjusted residual on the unweighted n. -
Everything past the variable roles must be named,
tab()and its siblings taking...right after their variable arguments: an unnamed extra argument is refused, a typo gets a suggestion, and an abbreviation that used to partial-match silently is refused. An unknown value now aborts too. -
A variable with a level named
"Total"(or"Ensemble") is refused, naming the level: those are tabxplor’s own total-row labels. Rename it, or move them withoptions(tabxplor.total_names =). -
fmtcolumn attributes:typeis split intoscale(what the column estimates) andpct_type(which kind of percentage),ci_typeis gone, and a newcol_groupnames a column block’s sub-population. Only code building or inspectingfmtvectors is affected; seevignette("tabxplor-programming"). -
tab_transpose()is a supported reshape operation again (it was soft-deprecated in the pre-release): it is the way to get a transposed object, and the only way to put a mean on a row, since a number given torow_varsis always cut into levels. Use the exporters’transpose = TRUEwhen only the output matters. A transposed column now claims only what its parts agreed on, by the same rule everybind_rows()follows. -
Options renamed, the old names still read:
tabxplor.total_namesreplaces thetotal_names/totaltab_name/other_levelarguments, andtabxplor.starscarries the star ladder.
Bug fixes
-
tab()could not use a column whose name was not syntactic:tab(data, x, `my var`)aborted saying the column did not exist. - A factor carrying
NAas a real level (factor(..., exclude = NULL), common in imported data) no longer crashesprint(),format()or any export. -
pct = "col"andna = "drop_all"failed on anorderedrow variable, on printing or exporting; andtab(pct = "all", ci = "cell")errored, weighted or not. -
The
langargument now works on Linux, and switching language mid-session keeps the new one. -
tab_spread()lost the table’s whole test summary, anddplyr::bind_rows()on two grouped tables lost the weight footnote, colour legend and caption. -
ref/ref2accept"last", and errors are clearer for an unknown namedref, a variable used on two axes, or an all-zero weight.tab()accepts adata.tableand a logicalcol_var. -
dplyr::bind_rows()on two tables with different columns crashed on printing: the missing cells come back all-NA, which the colour engine could not read. They now render blank everywhere. -
A column holding unlike quantities — a transposed table with percentage AND mean columns, or a bind of the two — coloured a mean difference on the percentage-point ladder, sending it to the deepest shade. It now grades only the cells its ladder can read, and says so once;
color = "ratio"grades them all.
Deprecations
Soft-deprecated
- Functions:
tab_many()(a shim overtab()) and the step-by-step chaintab_pct()/tab_tot()/tab_totaltab()/tab_ci()/tab_chi2(). -
tab()arguments: singularrow_var/col_var,sup_cols(usecol_vars),filter(filter upstream),names_prefix/names_sort(they belong totab_spread()),add_n(usen =),total_names/totaltab_name/other_level(useoptions(tabxplor.total_names =)),OR(usedisplay = "{or}"/ref2 = "cumulative"),ci = "diff"/"ratio"(useci = "ref"),chi2(usetest),method_cell/method_diff(useci_method), and"diff_ci"/"after_ci"/"ci"(usecolor+color_signif). - Export arguments, accepted and ignored with a message:
color_type,html_24_bit,html_font,full_width,position, andtab_xl(n_min =, hide_near_zero =)— width, font and placement are CSS rules now (tab_css()), andn_minis atab()argument. Every other unknown argument oftab_html()/tab_md()/tab_xl()/tab_css()/forest_plot()is an error with a suggestion, as it already was ontab(). - Elsewhere:
tab_xl(print_color_legend =)→color_legend =,set_diff_type()→set_ref_type(), thein_totrowcell field →row_kind(is_totrow()andx$in_totroware unchanged), andoptions(tabxplor.signif_levels)/options(tabxplor.signif_labels). - The
fmtattributetype, which said both what a column estimates and which percentage it is:get_type()/set_type()andfmt(type =)translate intoscale+pct_type(see?tabxplor-type) and are defunct in 2.1.0.
Hard-deprecated (defunct in 2.1.0)
- The step-by-step chain warns on every call. What goes away is the chaining API, not the statistics:
tab()andtab_num()compute the same numbers, in one pass. -
tab_prepare()andcomplete_partial_totals()will become internal or be removed;tab_prepare()’s work is done bytab()itself.
Removed (now an error)
- Functions:
tab_plot()andkable_tabxplor_style()— usetab_export()andtab_html(). -
The
kableExtraHTML engine, withengine =(accepted and ignored) and the optionstabxplor.tab_kable_engine,tabxplor.always_add_css_in_tab_kable,tabxplor.kable_html_font. kableExtra stays optional, and is no longer what opens a table in the Viewer:tab_html()paints that page itself, to match the table’s theme. - Options:
method_ratioand its siblings,tabxplor.ci_print(usedisplay = "base_ci"/"base_moe"),tabxplor.compact,tabxplor.color_style_type. -
The
fmtattributeci_type, withget_ci_type()/set_ci_type()andfmt()’sci_type =argument: the stored interval is always on the estimate’s ownscale.
tabxplor 1.3.0
CRAN release: 2025-03-09
Added
-
tab_many(): with severalrow_vars, addingcompact = TRUEbind all tables in a single one (but only works if notab_varsare provided).tab_compact()can be used to do the same ontab_plain(). - by default, chi2 pvalue is now added as a row in the tables (below total rows): there is no more chi2 table in attribute by default (but you can still add it manually with
tab_chi2()).tab_pvalue_lines()do that fromattr(tabs, "chi2"). - by default with
tabxplor_tab,arrange()now keeps the order of groups and totals - in
tab_num(), if all means < 10, display 1 digit ; if all means < 1, display 2 digits -
tab_kable()now works with alistoftab, if allcol_varsare the same and there are notab_vars
Bug corrections
- in
tab_kable(), escape signif stars * with in .rmd only, otherwise it breaks the html -
ci = "cell"didn’t work withpct = "col"with non pct rows
tabxplor 1.2.1
CRAN release: 2024-10-04
Added
- in
tab()andtab_many(), possibility to add unweighted counts (add_n = TRUE) ; and with row and column percentages a row or column with the other kind of percentage (add_pct = TRUE) -
kable_tabxplor_style(): same html table style thantab_kable(), but for any data.frame. - with
color = "diff", a×2color rule was added - enhanced printing of confidence intervals for differences
- enhanced printing of pvalue (
<0.01%style), Chi2 number added in Chi2 tables.
Bug corrections
- reference columns were lost with
pct = "col" -
tab_kable()andtab_plot(): removed unwanted bold formatting
tabxplor 1.2.0
CRAN release: 2024-08-30
Added
-
jmvtab(): implementation oftab_many()for Jamovi, with a user interface -
tab_plot(): print tables asggplot, to export as images -
tab_wrap_text(): function to wrap text in rownames and colnames
tabxplor 1.1.3
CRAN release: 2024-03-08
Bug corrections
-
tab_kable(): html tags in tables were no longer working and were appearing as text (knitr::kable()now needs aformat = "html"argument)
tabxplor 1.1.2
CRAN release: 2024-02-08
Added
-
tab_kable(): acolor_legendargument have been added, to possibly remove the legend.
tabxplor 1.1.1
CRAN release: 2024-01-22
Added
-
fct_recode_helper(): helper function to recode multiple variables withforcats::fct_recode. -
complete_partial_totals(): complete partial total rows, total tables, and reference rows.
Bug corrections
-
tab_spread: incomplete subtables led to partial total rows, total tables and reference rows. -
tab_xl: withsheets = "unique", multiple empty sheets were created anyway -
crayon()error with colors in tabs printing on R 4.2.2 - color printing was not working with only one numeric
col_var
tabxplor 1.0.3
CRAN release: 2022-04-09
Added
- Remove rows with missing values or 0 in
wt(weight), for them not to be added in counts (except intab_plain) -
fmt_get_color_code(): get the html color codes of a table as a character vector
Bug corrections
-
tab_many: bug with totaltab when two numeric column variables (and a tabs_var) -
tab_spreadnot working with twotab_vars. Ok with a workaround, but would need to calculate one subtotal for each level ofspread_varsin *tab_totaltabto fully work (and, then, to fully hierarchise total tables…). -
wtargument procudes missing values with NA ; NA in weight variable are now automatically removed (excepted intab_plain) - Addition between
fmtvectors wasn’t working no more with percentages - In
tab_plain,col_varwas not sorted anymore (names_sort = TRUEadded inpivot_wider) -
tab_color_legend()was not working when some cols were colored and some not colored - In
tab()functions, correction was made to remove a R 4.1.2dplyrwarning message (data frame results infilter()are deprecated, useif_any()orif_all()).
tabxplor 1.0.2
CRAN release: 2021-10-21
Added
- With
tab_kable, option to use htmlpopoverinstead oftooltips, to be able to use it in rmarkdown with a floating table of content. - Two new 24 bits color styles for hmtl tables (
"blue_red"and"green_red"). - Possibility to provide a custom color palette for color styles, using
set_color_style(). -
tab_corewas deprecated and renamedtab_plainfor more clarity. Added options to render a table with normal numeric vectors instead of fmt, and to render a plain data.frame instead of a tibble. - Two way to print confidence intervals, using global option
"tabxplor.ci_print":"moe", for margin of errors, prints as12%±1.1;"ci"prints the interval11·13%. - In
tab_kable, confidence intervals of type"cellwith print type"moe"appear in subscript. - In
tab_xl, colors now are the same and works in the same way thattabandtab_kable.
Bug corrections
- With
tabargumentcolor = "after_ci", whendiffis negative, cells between 0 and -5% don’t get colors. - Problems in
tab_plainwith zero-rows dataframes - With
color = "contrib", no color when contribution is equal to the mean contribution (or a multiple of it). - With
tab_kable, white spaces are producing unwanted text wrapping (in the middle of numbers) - In tabs and tooltips,
diffnot printing good withtype = "mean".