I would like to add a horizontal line under one of the rows in my kableextra table. The parameter hline_after for row_spec function is supposed to add the horizontal line under the row:
However, this does not happen, the parameter appears to have no effect at all.
Example code:
x <- knitr::kable(head(mtcars), "html")
kableExtra::row_spec(x, 2, hline_after = TRUE)
Does anyone know why this happens and is there another way to add the horizontal line to the table (using the same packages).
Thank you
EDIT As Lyngbakr pointed out, the function works when output is set to LaTeX.
hline_after
isn't even passed torow_spec_html
, the internal function that actually creates the table in html. It is passed torow_spec_latex
, though. – Marplotkable
/kableExtra
, you could usextable
. – Marplot