# NOT RUN {
ht <- huxtable(a = 1:3, b = 1:3)
left_border(ht) <- 1
left_border(ht)
print_screen(ht)
ht <- huxtable(a = 1:3, b = 3:1)
set_left_border(ht, 1)
set_left_border(ht, 1:2, 1, 1)
set_left_border(ht, 1:2, 1:2, c(1, 2), byrow = TRUE)
set_left_border(ht, where(ht == 1), 1)
# When cells span multiple rows:
ht <- tribble_hux(
~Col1, ~Col2,
"Cell 1,1 spans 2 rows", "Cell 1,2",
"Cell 2,1 is invisible", "Cell 2,2"
)
rowspan(ht)[1, 1] <- 2
ht
bottom_border(ht)[2, ] <- 1
bottom_border_color(ht)[2, ] <- 'red'
# Cell 1, 1 does not have a border set:
ht
# Fixed:
bottom_border(ht)[1, 1] <- 1
bottom_border_color(ht)[1, 1] <- 'red'
ht
# }
Run the code above in your browser using DataLab