rdatatablekableextra

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


Does anyone have an idea how to add a line to this table created with kableExtra?


Solution

  • 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;")