Created
March 26, 2018 23:04
-
-
Save cecilialee/6a3238c2958d2ab39725b30551d120ce to your computer and use it in GitHub Desktop.
Set horizontal sroll in DT::datatable in Shiny. #r #shiny
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(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