huxtable (version 4.5.0)

set_outer_borders: Set borders around a rectangle of cells

Description

Set borders around a rectangle of cells

Usage

set_outer_borders(ht, row, col, value)

set_outer_border_colors(ht, row, col, value)

set_outer_border_styles(ht, row, col, value)

Arguments

ht

A huxtable.

row

A row specifier. See rowspecs for details.

col

An optional column specifier.

value

Border width in points, border color, or border style (see left_border_style()).

Details

set_outer_borders sets borders round the top, bottom, left and right of a group of cells. Behaviour is undefined unless row and col specify contiguous sequences. set_outer_border_colors and set_outer_border_styles set border colors and styles.

Examples

Run this code
# NOT RUN {
ht2 <- huxtable(a = 1:3, b = 1:3)
set_outer_borders(ht2, 1)
set_outer_borders(ht2, 2:3, 1:2, 1)

# Problems with colspan:
rowspan(ht2)[2, 1] <- 2
set_outer_borders(ht2, 1:2, 1:2, 1)

# }

Run the code above in your browser using DataCamp Workspace