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

merge_cells

Merge a range of cells


Description

Merge a range of cells

Usage

merge_cells(ht, row, col)

Arguments

ht

A huxtable.

row

A row specifier. See rowspecs for details.

col

An optional column specifier.

Details

merge_cells(ht, c(min_row, max_row), c(min_col, max_col)) is equivalent to

colspan(ht)[min_row, min_col] <- max_col - min_col + 1
  rowspan(ht)[min_row, min_col] <- max_row - min_row + 1

Value

The ht object.

See Also

Other cell merging: merge_across(), merge_repeated_rows()

Examples

ht <- hux(a = 1:3, b = 1:3)
ht <- set_all_borders(ht, 1)
merge_cells(ht, 2:3, 1:2)

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.