cecilialee
3/26/2018 - 11:04 PM

Set horizontal sroll in DT::datatable in Shiny

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)