Created
October 10, 2022 12:22
-
-
Save andreagrioni/26ead2a295af92ccea5b64566f86fd8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(DT) | |
#' render_dt | |
#' render a DT table within Rmarkdown. | |
#' @param table a data frame | |
render_dt <- function(table) { | |
table %>% | |
DT::datatable( | |
extensions = 'Buttons', | |
options = list(dom = 'Blfrtip', scrollX = TRUE, scrollY=TRUE, | |
buttons = c('copy', 'csv'), | |
lengthMenu = list(c(10,25,50,-1), | |
c(10,25,50,"All"))))} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment