huxtable (version 4.4.0)

rowspan: Row and column span

Description

Functions to get or set the row and column span property of huxtable cells.

Usage

rowspan(ht)
rowspan(ht) <- value
set_rowspan(ht, row, col, value, byrow = FALSE)
map_rowspan(ht, row, col, fn)

colspan(ht) colspan(ht) <- value set_colspan(ht, row, col, value, byrow = FALSE) map_colspan(ht, row, col, fn)

Arguments

ht

A huxtable.

value

An integer vector or matrix.

Set to NA to reset to the default, which is 1.

row

A row specifier. See rowspecs for details.

col

An optional column specifier.

fn

A mapping function. See mapping-functions for details.

byrow

Deprecated. Use by_cols() instead.

Value

For rowspan, the rowspan property. For set_rowspan and map_rowspan, the modified huxtable.

Details

The rowspan and colspan of a cell determine its height and width, in rows and columns. A cell with rowspan of 2 covers the cell directly below it. A cell with rowspan of 2 and colspan of 2 covers a 2 x 2 square, hiding three other cells.

Examples

Run this code
# NOT RUN {
rowspan(jams)[1, 1] <-  2
rowspan(jams)
jams <- set_all_borders(jams, 1) 
jams
# }

Run the code above in your browser using DataCamp Workspace