kableExtra
kableExtra copied to clipboard
Allow vector for `row_spec(align=...)`
Describe the bug
This is a feature request.
I would like to be able to control the text alignment of the individual columns in a table header row by providing a vector of alignment values. For instance:
df |> kbl() |>
row_spec(
0,
align = c("l", "c", "c", "c")
)
To Reproduce
library(kableExtra)
iris |> kbl() |> row_spec(0, align=c("l", "c", "c", "c", "c", "c"))
#: Error in if (align %in% c("l", "c", "r")) { :
#: the condition has length > 1