I am trying to print a data.frame in a pdf using kable
and collapse_rows
functions. And it did not manage to make it works. Please try the following reprex:
---
title: "Example"
output:
bookdown::pdf_document2
---
```{r bandIdentif, echo=F}
library(dplyr);library(kableExtra)
dt <- data.frame(A = c(rep("a", 2), rep("b", 3)),
B = c(paste("answer", 1:5)))
kable(dt, "latex") %>%
collapse_rows(columns = 1, valign = "top")
```
I have updated all the packages (MaxTex and R) and Rstudio. However, the pdf output exhibit a strange behavior of vertical alignment:
I looked during hours on the web but i cannot manage to find a solution. Please help :)