dataTableOutput has no argument width. You can use the column within fluidRow the width of the argument by giving an integer from 1 to 12.
library(shinythemes) ui <- fluidPage(theme = shinytheme("Spacelab"), fluidRow( column( dataTableOutput(outputId = "table"), width = 6) ) ) server <- function(input, output){ df <- as.data.frame(matrix(0, ncol = 20, nrow = 5)) output$table <- renderDataTable({df}, options = list(scrollX = TRUE)) } shinyApp(ui = ui,server = server)
Parameters from the JavaScript DataTable library can be passed directly through renderDataTable arguments. For example, if you set scrollX to true, this allows you to scroll through tables.
source share