Here is an example of the FixedHeader extension. Scroll down the page, and you will always see the table header.

library(DT)
datatable(
  iris, extensions = 'FixedHeader',
  options = list(pageLength = 50, fixedHeader = TRUE)
)