假设下一个例子:
library(knitr)
library(kableExtra)
df <- data.frame(a = letters[1:10], b = 1:10)
names(df) <- c("This is a looooooong title, I don't know how to handle this... Also, I'm trying to extend this title even more... This column name will be used to compute vertical space","I want to align vectically this column name")
df %>% kable(format = 'latex', linesep = "", align = 'c') %>% kable_styling(full_width = T)
如何垂直对齐第二列名称?