I'd like to right align the rowname_col
but it doesn't look like you can apply cols_align
to rownames?
tibble(
one = c("Long names", "Other Name", "Name | Name"),
two = 1:3
) %>% gt(rowname_col = "one") %>%
cols_align(align = "right", columns = vars(one))
You can right align the rowname column like so:
library(dplyr)
library(gt)
tibble(
one = c("Long names", "Other Name", "Name | Name"),
two = 1:3
) %>% gt(rowname_col = "one") %>%
tab_style(
style = list(
cell_text(align = "right")
),
locations = cells_stub(rows = TRUE)
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With