tab_plot: Print a tabxplor table as plot

tab_plotR Documentation

Print a tabxplor table as plot

Description

Print a tabxplor table as plot

Usage

tab_plot(
  tabs,
  theme = c("light", "dark"),
  color_type = NULL,
  html_24_bit = NULL,
  color_legend = TRUE,
  caption = NULL,
  wrap_rows = 35,
  wrap_cols = 14,
  whitespace_only = TRUE
)

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

Use 24bits colors palettes for html tables : set to "green_red" or "blue_red". Only with mode = "color_code" (not mode = "crayon") and ⁠theme = "light⁠. Default to getOption("tabxplor.color_html_24_bit").

color_legend

Print colors legend below the table ?

caption

The table caption.

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.

Value

A ggplot object to be printed in the RStudio Plots pane or exported as image, using ggtexttable.

Examples


tab(forcats::gss_cat, race, marital, pct = "row", color = "diff") |>
  tab_plot()



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