r - kableExtra: Specify the look of selected rows programatically -
currently kableextra 0.5.1 supports specify of selected row. wonder if there tweak specify of selected rows programatically row_spec(x, c(1, 3, 4), bold = true, italic = true). thanks
library(knitr) library(kableextra)  x <- knitr::kable(head(mtcars), "latex") kableextra::row_spec(x, 1, bold = true, italic = true)      
you can in loop.
multirow_spec <- function(x, rows, ...) {   (row in rows)      x <- kableextra::row_spec(x, row, ...)   x }  x <- knitr::kable(head(mtcars), "latex") multirow_spec(x, c(1, 3, 4), bold = true, italic = true)      
Comments
Post a Comment