Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

merge_repeated_rows

Merge repeated rows into multirow cells


Description

Merge repeated rows into multirow cells

Usage

merge_repeated_rows(ht, row, col)

Arguments

ht

A huxtable.

row

A row specifier. See rowspecs for details.

col

An optional column specifier.

Details

Repeated rows in each column are merged into cells with rowspan > 1.

If row contains gaps, results may be unexpected (and a warning is given).

Value

The ht object.

See Also

Other cell merging: merge_across(), merge_cells()

Examples

ht <- as_hux(jams[c(1, 2, 2, 3, 3, 4), ])
ht <- add_columns(ht, c("Sugar", "30%", "40%", "30%", "40%", "30%"),
      after = 1)
ht
merge_repeated_rows(ht)
merge_repeated_rows(ht, everywhere, "Type")

huxtable

Easily Create and Style Tables for LaTeX, HTML and Other Formats

v5.3.0
MIT + file LICENSE
Authors
David Hugh-Jones [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.