borders: Set borders

Description Usage Arguments Details Limitations See Also Examples

Description

These functions set borders between cells.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
left_border(ht)
left_border(ht) <- value
set_left_border(ht, row, col, value = 0.4)
map_left_border(ht, row, col, fn)

right_border(ht)
right_border(ht) <- value
set_right_border(ht, row, col, value = 0.4)
map_right_border(ht, row, col, fn)

top_border(ht)
top_border(ht) <- value
set_top_border(ht, row, col, value = 0.4)
map_top_border(ht, row, col, fn)

bottom_border(ht)
bottom_border(ht) <- value
set_bottom_border(ht, row, col, value = 0.4)
map_bottom_border(ht, row, col, fn)

## S3 replacement method for class 'huxtable'
left_border(ht) <- value

## S3 replacement method for class 'huxtable'
right_border(ht) <- value

## S3 replacement method for class 'huxtable'
top_border(ht) <- value

## S3 replacement method for class 'huxtable'
bottom_border(ht) <- value

Arguments

ht

A huxtable.

value

A numeric thickness or a brdr() object.

row

A row specifier. See rowspecs for details.

col

An optional column specifier.

fn

A mapping function. See mapping-functions for details.

Details

Borders are always "collapsed": right_border(ht)[, 1] is the same as left_border(ht)[, 2], and setting one sets the other.

Setting left_border(ht) <- number sets the border thickness. You can set multiple properties at once by using brdr().

Currently in LaTeX, all non-zero border widths on a given line must be the same.

Limitations

See Also

set-multiple

Other border properties: border-colors, border-styles

Examples

1
2
3
4
5
6
7
bottom_border(jams)[1, ] <- 0.4
jams

bottom_border(jams)[1, ] <- brdr(0.4, "solid", "blue")
jams

set_bottom_border(jams, brdr(0.4, "solid", "green"))

huxtable documentation built on Feb. 15, 2021, 1:07 a.m.