kableExtra icon indicating copy to clipboard operation
kableExtra copied to clipboard

Allow vector for `row_spec(align=...)`

Open warnes opened this issue 2 years ago • 0 comments

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

warnes avatar Nov 04 '23 15:11 warnes