Joe94
Joe94

Reputation: 145

Table with package kableextra - how to add lines to the tables?

has anyone an idea how to add a line to this table created with the package kableextra?

Upvotes: 3

Views: 5159

Answers (1)

Ronak Shah
Ronak Shah

Reputation: 388972

You can modify the solution suggested by @TJ87 in the comments to create a horizontal line after every 2 rows.

library(kableExtra)

dt %>%
  kbl(caption = "Ü") %>%
  kable_classic(full_width = T, html_font = "Cambria") %>%
  row_spec(seq(2, nrow(dt), 2), extra_css = "border-bottom: 1px solid;")

Upvotes: 3

Related Questions