tab_kable {tabxplor}R Documentation

Print a tabxplor table in html

Description

Print a tabxplor table in html

Usage

tab_kable(
  tabs,
  theme = c("light", "dark"),
  color_type = NULL,
  html_24_bit = NULL,
  tooltips = TRUE,
  popover = NULL,
  color_legend = TRUE,
  caption = NULL,
  ...
)

Arguments

tabs

A table made with tab or tab_many.

theme

By default, a white table with black text, Set to "dark" for a black table with white text.

color_type

Set to "text" to color the text, "bg" to color the background. By default it takes getOption("tabxplor.color_style_type").

html_24_bit

Should specific 24bits colors palettes be used ? Default to getOption("tabxplor.color_html_24_bit")

tooltips

By default, html tooltips are used to display additional informations at mouse hover. Set to FALSE to discard.

popover

By default, takes getOption("tabxplor.kable_popover"). When FALSE, html tooltips are of the base kind : they can't be used with floating table of content in rmarkdown documents. Set to TRUE to use kableExtra html popovers instead, which are compatible with floating toc. Remember to enable the popover module by copying the following code into your document : <script> $(document).ready(function(){ $('[data-toggle="popover"]').popover(); }); </script>

color_legend

Print colors legend below the table ? You can then use a css chunk in rmarkdown to change popovers colors.

caption

The table caption. For formatting, you need to use a css with ⁠caption{}⁠in rmarkdown.

...

Other arguments to pass to kableExtra::kable_styling.

Value

A html table (opened in the viewer in RStudio). Differences from totals, confidence intervals, contribution to variance, and unweighted counts, are available in an html tooltip at cells hover.

Examples


tabs <- tab(forcats::gss_cat, race, marital, year, pct = "row", color = "diff")
tab_kable(tabs, theme = "light", color_type = "text")



[Package tabxplor version 1.1.3 Index]