如何在 中创建短标题kable
?
library(dplyr)
library(knitr)
library(kableExtra)
df <- data.frame( X = sample(letters, 10), y = runif(10), z = sample(10:20, 10))
kable(df,
booktabs = TRUE,
caption = "This caption is way too long and doesnt look good when formatted in the Table of Contents. What you really need here is a much shorter caption so that your eyes dont go crazy trying to figure out what information the author is trying to convey. Often there is too much information in the caption anyway so why not shorten it?.",
escape = FALSE,
format = 'latex') %>%
kable_styling(latex_options = c("striped", "hold_position"))