merge_across | R Documentation |
merge_across()
creates multicolumn cells within each row.
merge_down()
creates multirow cells within each column.
merge_across(ht, row, col)
merge_down(ht, row, col)
ht |
A huxtable. |
row |
A row specifier. See rowspecs for details. |
col |
An optional column specifier. |
The ht
object.
In merged cell ranges, only the top left cell's content is displayed.
In addition, when you merge cells (either by setting colspan()
or
rowspan()
, or using merge_cells()
and friends) the content of the top
left cell is copied to other cells. This prevents unexpected changes to
content if you reorder or subset rows and columns.
Other cell merging:
merge_cells()
,
merge_repeated_rows()
ht <- as_hux(matrix(1:12, 4, 3, byrow = TRUE))
ht <- set_all_borders(ht, 1)
merge_across(ht, 2:4, 2:3)
merge_down(ht, 2:4, 2:3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.