I am trying to set the right border of col = 1 of my huxtable. I can get the border to appear, but it remains "dashed" despite my attempts to change it to "solid".
Example:
library(dplyr)
library(huxtable)
set.seed(72723)
df <- data.frame(ID = sample(c(1:30), 200, replace = TRUE),
Day = sample(seq(2, 16, 2), 200, replace = TRUE),
Treatment = sample(c("A", "B", "C"), 200, replace = TRUE))
df <- df[order(df$Treatment, df$ID, df$Day), ]
df <- df %>% distinct(ID, Day, .keep_all = TRUE)
out <- as_huxtable(table(df$Treatment, df$Day))
out
Raw huxtable:
Now, I want to set a bottom border under the values of Day and a right border next to the treatment values.
out %>% insert_row(rep(NA, length(out)), after = 0) %>%
set_contents(row = 1, col = round(length(out)/2), value = "Day") %>%
set_bottom_border(row = 2, col = everywhere) %>%
set_right_border(row = everywhere, col = 1, brdr(style = "solid"))
The right border appears dashed:
The right border appears dashed despite setting brdr(style = "solid")
I also try using set_right_border_style(value = "solid)
:
out %>% insert_row(rep(NA, length(out)), after = 0) %>%
set_contents(row = 1, col = round(length(out)/2), value = "Day") %>%
set_bottom_border(row = 2, col = everywhere) %>%
set_right_border(row = everywhere, col = 1) %>%
set_right_border_style(row = everywhere, col = 1, value = "solid")
No change:
How can I change this vertical border to the right of column 1 to be solid?