I am creating a Latex table using the kableExtra
package in R. I want to insert a horizontal line after a certain row, however, this also automatically adds an empty row. How can this behavior be suppressed?
The problem is coming from the fact that right now it adds midrule\
instead of just midrule
.
library(kableExtra)
set.seed(123)
df <- data.frame(matrix(runif(9), 3, 3))
kable(
df,
booktabs = TRUE,
format = "latex") %>%
row_spec(2, hline_after = T)