我正在使用kable制作下表,但似乎无法摆脱表格标题和实际表格之间的空白。具体来说,我正在使用投影仪演示输出来进行此rmarkdown。
dist.class.party<-table(dat3$class2[dat3$party2!="Indep"], dat3$party2[dat3$party2!="Indep"])
knitr::kable(dist.class.party, linesep="", col.names = c("Democrat", "Republican"), digits=2, caption = "Distribution of Party and Class", format="latex", booktabs = T) %>%
kable_styling(full_width = T, position = "left", font_size = 7) %>% footnote(
alphabet = c("Middle and lower class combined", "Independents are dropped"))%>%
row_spec(0,bold=TRUE)