I am using kableExtra for longtable with the following code. 
library(knitr)
library(kableExtra)
long_dt <- rbind(mtcars, mtcars)
kable(
      long_dt, 
      format    = "latex", 
      longtable = T, 
      booktabs  = T, 
      caption   = "Longtable"
      ) %>%
add_header_above(c(" ", "Group 1" = 5, "Group 2" = 6)) %>%
kable_styling(latex_options = c("repeat_header"))
The output is
I wonder how to add text (Continued on Next Page ...) at the bottom of the table if it spans to next page.

