R: Border colors

left_border_color {huxtable} | R Documentation

## Border colors

### Description

Functions to get or set the border colors property of huxtable table cells.

### Usage

    left_border_color(ht)
    left_border_color(ht) <- value
    set_left_border_color(ht, row, col, value, byrow = FALSE)

    right_border_color(ht)
    right_border_color(ht) <- value
    set_right_border_color(ht, row, col, value, byrow = FALSE)

    top_border_color(ht)
    top_border_color(ht) <- value
    set_top_border_color(ht, row, col, value, byrow = FALSE)

    bottom_border_color(ht)
    bottom_border_color(ht) <- value
    set_bottom_border_color(ht, row, col, value, byrow = FALSE)

### Arguments

`ht` | A huxtable.
`value` | A vector or matrix of colors. Set to `NA` for the default. Set to `NA` to reset to the default.
`row` | A row specifier. See `rowspecs` for details.
`col` | An optional column specifier.
`byrow` | If `TRUE`, fill in values by row rather than by column.

### Details

Both LaTeX and HTML collapse borders. If results are not what you expected, try setting the adjoining border of the previous cell to width 0 (e.g. for a left border color, unset the right border of the cell on the left).

### Value

For `left_border_color`, the `left_border_color` attribute. For `set_left_border_color`, the `ht` object.

Similarly for the other functions.

### See Also

`set_all_border_colors`

### Examples

    ht <- huxtable(a = 1:3, b = 1:3)
    left_border_color(ht) <-  'red'
    left_border_color(ht)

    ht <- huxtable(a = 1:3, b = 3:1)
    set_left_border_color(ht, 'red')
    set_left_border_color(ht, 1:2, 1, 'red')
    set_left_border_color(ht, 1:2, 1:2, c('red', 'blue'), byrow = TRUE)
    set_left_border_color(ht, where(ht == 1), 'red')

[Package huxtable version 3.0.0 Index]