Quantcast
Channel: Active questions tagged kable - Stack Overflow
Viewing all articles
Browse latest Browse all 102

How can I centralize kable tables in RMarkdown?

$
0
0

I'm writing a document in RMarkdown using bookdown::pdf_document2. I'm using kableExtra package to generate tables.

This is the code:

library(kableExtra)data.frame(exp = c("LR Test", "R$^2$ de McFadden"),                     value = c("4155.8$^{***}$", 0.299)) |>  kable(col.names = c("Variável explicativa", "Efeito"),        caption = "Teste de razão de verossimilhança",        booktabs = TRUE,        longtable = TRUE,        linesep = "",        escape = FALSE) |>  kable_styling(position = "center") |>  footnote(general_title = "",           general = "Nota: $^{*}$p $<$ 0.1; $^{**}$p $<$ 0.05; $^{***}$p $<$ 0.01",           escape = FALSE)

I'm already using kable_styling(position = "center") to positioning the table in center of the page, but this is the result that i'm getting:

enter image description here

How can I position the table in center of the page?


Viewing all articles
Browse latest Browse all 102

Trending Articles