Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow vector for row_spec(align=...) #773

Open
warnes opened this issue Nov 4, 2023 · 0 comments · May be fixed by #774
Open

Allow vector for row_spec(align=...) #773

warnes opened this issue Nov 4, 2023 · 0 comments · May be fixed by #774

Comments

@warnes
Copy link

warnes commented Nov 4, 2023

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
@vincentarelbundock vincentarelbundock changed the title Feature Request: Allow vector for row_spec(align=...) Allow vector for row_spec(align=...) Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants