Skip to content

Instantly share code, notes, and snippets.

@cecilialee
Created March 26, 2018 23:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cecilialee/6a3238c2958d2ab39725b30551d120ce to your computer and use it in GitHub Desktop.
Save cecilialee/6a3238c2958d2ab39725b30551d120ce to your computer and use it in GitHub Desktop.
Set horizontal sroll in DT::datatable in Shiny. #r #shiny
library(shiny)
library(DT)
ui <- fluidPage(
dataTableOutput("mtcars")
)
server <- function(input, output, session) {
output$mtcars <- renderDataTable(
datatable(mtcars, options = list(scrollX = TRUE))
)
}
shinyApp(ui, server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment