kable_tabxplor_style: Print a tabxplor table in html

kable_tabxplor_styleR Documentation

Print a tabxplor table in html

Description

Print a tabxplor table in html

Usage

kable_tabxplor_style(
  tabs,
  caption = knitr::opts_current$get("tab.cap"),
  theme = c("light", "dark"),
  total_in_bold = TRUE,
  all_column_borders = FALSE,
  html_font = NULL,
  full_width = FALSE,
  wrap_rows = 35,
  wrap_cols = 15,
  whitespace_only = TRUE,
  subtext = "",
  ...
)

Arguments

tabs

A data.frame.

caption

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

theme

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

total_in_bold

Should rows and cols with "Total" string be set in bold ?

all_column_borders

Put a vertical border around each column ?

html_font

A string for HTML css font. By default, it uses '"DejaVu Sans", "Arial", arial, helvetica, sans-serif'. Set another default by setting options("tabxplor.kable_html_font" = ).

full_width

A TRUE or FALSE variable controlling whether the HTML table should have the preferable format for full_width. If not specified, a HTML table will have full width by default but this option will be set to FALSE for a LaTeX table.

wrap_rows

By default, rownames are wrapped when larger than 30 characters.

wrap_cols

By default, colnames are wrapped when larger than 12 characters.

whitespace_only

Set to FALSE to wrap also on non whitespace characters.

subtext

A character vector to print rows of legend under the table.

...

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 <- tibble::tibble(nm      = c("First", "Second", "Total"),
                       column1 = c(1, 2, 3),
                       column2 = c(4, 5, 6)                    )
kable_tabxplor_style(tabs)


BriceNocenti/tablr documentation built on April 12, 2025, 12:56 a.m.