0

I am trying to print the result of table() using knitr. My MWE:

df <- data.frame(Linha=c("A","A","A","B","B","C"), Coluna=c(1,2,1,1,2,3))
tab <- table(df)
kableExtra::kbl(tab,,format = "latex")

I get this:

Table with knitr

With no variable names. But I would like this:

Table with variables' names

Is it possible? Thanks!

JPMD
  • 644
  • 1
  • 7
  • 19

0 Answers0