These functions set border styles.
left_border_style(ht)
right_border_style(ht)
top_border_style(ht)
bottom_border_style(ht)
left_border_style(ht) <- value
right_border_style(ht) <- value
top_border_style(ht) <- value
bottom_border_style(ht) <- value
set_left_border_style(ht, row, col, value)
set_right_border_style(ht, row, col, value)
set_top_border_style(ht, row, col, value)
set_bottom_border_style(ht, row, col, value)
map_left_border_style(ht, row, col, fn)
map_right_border_style(ht, row, col, fn)
map_top_border_style(ht, row, col, fn)
map_bottom_border_style(ht, row, col, fn)
A huxtable.
One of "solid"
, "double"
, "dashed"
or "dotted"
. Set to NA
to reset to the default, which is "solid"
.
A row specifier. See rowspecs for details.
An optional column specifier.
A mapping function. See mapping-functions for details.
Borders are always "collapsed": right_border_style(ht)[, 1]
is the same as
left_border_style(ht)[, 2]
, and setting one sets the other.
In HTML, you will need to set a width of at least 3 to get a double border.
Only "solid" and "double" styles are currently implemented in LaTeX.
Other border properties:
left_border()
,
left_border_color()
jams <- set_all_borders(jams)
bottom_border_style(jams)[1, ] <- "dotted"
jams
#> ┌────────────┬───────┬───────────────┐
#> │ Type │ Price │ Sugar content │
#> ├┈┈┈┈┈┈┈┈┈┈┈┈┼┈┈┈┈┈┈┈┼┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┤
#> │ Strawberry │ 1.90 │ 40.00% │
#> ├────────────┼───────┼───────────────┤
#> │ Raspberry │ 2.10 │ 35.00% │
#> ├────────────┼───────┼───────────────┤
#> │ Plum │ 1.80 │ 50.00% │
#> └────────────┴───────┴───────────────┘
#>
#> Column names: Type, Price, Sugar
set_bottom_border_style(jams, "double")
#> ┌────────────┬───────┬───────────────┐
#> │ Type │ Price │ Sugar content │
#> ├════════════┼═══════┼═══════════════┤
#> │ Strawberry │ 1.90 │ 40.00% │
#> ├════════════┼═══════┼═══════════════┤
#> │ Raspberry │ 2.10 │ 35.00% │
#> ├════════════┼═══════┼═══════════════┤
#> │ Plum │ 1.80 │ 50.00% │
#> └════════════┴═══════┴═══════════════┘
#>
#> Column names: Type, Price, Sugar