tab_wrap_text: Wrap column names and character/factor variables.

tab_wrap_textR Documentation

Wrap column names and character/factor variables.

Description

Wrap column names and character/factor variables.

Usage

tab_wrap_text(
  tabs,
  wrap_rows = 35L,
  wrap_cols = 15L,
  exdent = 1,
  whitespace_only = TRUE,
  unbreakable_spaces = TRUE,
  brk = "\n"
)

Arguments

tabs

A tabxplor_tab or a tibble .

wrap_rows

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

wrap_cols

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

exdent

On the second lines or more, the number or characters to use for indentation.

whitespace_only

Set to FALSE to wrap also on non whitespace characters.

unbreakable_spaces

Set to FALSE to keep normal spaces in text (auto-break).

brk

The string to use for linebreak : ⁠\n⁠ in text, but ⁠<br>⁠ in html.

Value

The same tabxplor_tab or tibble.

Examples


tab(forcats::gss_cat, race, marital, pct = "row", color = "diff") |>
  tab_wrap_text(wrap_rows = 5L, wrap_cols = 8L)



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