left_border_color

0th

Percentile

Border colors

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

Aliases
  • left_border_color
  • left_border_color<-
  • set_left_border_color
  • left_border_color.huxtable
  • left_border_color<-.huxtable
  • right_border_color
  • top_border_color
  • bottom_border_color
  • right_border_color<-
  • top_border_color<-
  • bottom_border_color<-
  • right_border_color.huxtable
  • top_border_color.huxtable
  • bottom_border_color.huxtable
  • right_border_color<-.huxtable
  • top_border_color<-.huxtable
  • bottom_border_color<-.huxtable
  • set_right_border_color
  • set_top_border_color
  • set_bottom_border_color
  • right_border_color
  • top_border_color
  • bottom_border_color
Examples
# NOT RUN {
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)
ht2 <- set_left_border_color(ht, 'red')
left_border_color(ht2)
ht3 <- set_left_border_color(ht, 1:2, 1, 'red')
left_border_color(ht3)
ht4 <- set_left_border_color(ht, 1:2, 1:2, c('red', 'blue'), byrow = TRUE)
left_border_color(ht4)
ht5 <- set_left_border_color(ht, where(ht == 1), 'red')
left_border_color(ht5)
# }
Documentation reproduced from package huxtable, version 1.2.0, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.