xxxxxxxxxx
library(knitr)
library(kablextra)
// print defined kable style for tables as default as changing the method
kable <- function(data, ) {
knitr::kable(data, booktabs = TRUE, align = "c", linesep = '') %>%
kable_styling(latex_options = c("hold_position", "repeat_header"), position = "center") %>%
row_spec(0, bold = TRUE)
}
knit_print.data.frame <- function(x, ) {
res <- paste(c("", "", kable(x)), collapse = "\n")
asis_output(res)
}
registerS3method("knit_print", "data.frame", knit_print.data.frame)