I am using kable to make the following table but I cannot seem to get rid of the white space between the title of the table and the actual table. Specifically, I am doing this rmarkdown with a beamer presentation output.
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)