
Print a tabxplor table in html
tab_kable(
tabs,
theme = c("light", "dark"),
color_type = NULL,
html_24_bit = NULL,
tooltips = TRUE,
popover = NULL,
...
)
By default, a white table with black text, Set to "dark"
for a
black table with white text.
Set to "text"
to color the text, "bg"
to color the
background. By default it takes getOption("tabxplor.color_style_type")
.
Should specific 24bits colors palettes be used ? Default to
getOption("tabxplor.color_html_24_bit")
By default, html tooltips are used to display additional informations
at mouse hover. Set to FALSE
to discard.
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 pkgrmarkdown 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>
You can then use a css
chunk in rmarkdown to change popovers colors.
Other arguments to pass to knitr::kable
and
kableExtra::kable_styling
.
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.
# NOT RUN {
tabs <- tab(forcats::gss_cat, race, marital, year, pct = "row", color = "diff")
tab_kable(tabs, theme = "light", color_type = "text")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab