| set-multiple {huxtable} | R Documentation |
These are convenience functions which set left, right, top and bottom properties simultaneously for the specified cells.
set_all_borders(ht, row, col, value, byrow = FALSE) set_all_border_colors(ht, row, col, value, byrow = FALSE) set_all_border_styles(ht, row, col, value, byrow = FALSE) set_all_padding(ht, row, col, value, byrow = FALSE) set_outer_borders(ht, row, col, value)
ht |
A huxtable. |
row |
A row specifier. See |
col |
An optional column specifier. |
value |
Value(s) to set. Set to |
byrow |
If |
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.
The modified huxtable.
ht <- huxtable(a = 1:3, b = 1:3) set_all_borders(ht, 1:3, 1:2, 1) ht <- set_all_border_colors(ht, 'red') ht <- set_all_border_styles(ht, 'double') ht <- set_all_padding(ht, 1:3, 1:2, "20px") 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)