I want to convert a huxtable into a flextable and for this I use huxtable::as_flextable. Know I need to set some borders (also completely on the right and on the left). Everything works fine but there is no border completely on the right in the first row. I really don't know why. Is there a bug in huxtable or flextable? And how could I fix that?
My code:
hux(
c("", "X"),
c("", "Y"),
c("", "Z"),
c("A", "1"),
c("", "2"),
c("B", "1"),
c("", "2"),
c("C", "1"),
c("", "2")
) %>%
merge_cells(1, 1:3) %>%
merge_cells(1, 4:5) %>%
merge_cells(1, 6:7) %>%
merge_cells(1, 8:9) %>%
set_top_border(value = 0.5) %>%
set_left_border(row = 1:2, col = 1, value = 0.5) %>%
set_right_border(row = 1:2, col = c(3, 5, 7, 9), value = 0.5) %>%
huxtable::as_flextable()
That's the result:
