Hello everyone can you tell me why my datatable , Extension "responsive" does not work with some condition data,, here the explanation..
library(shiny)
library(DT)
shinyApp(
ui = fluidPage(
Input: Select number of rows to display ----
radioButtons("disp", "Show Data",
choices = c(Head = "head",
Setosa = "setosa",
Versicolor = "versicolor",
All = "All"
),
selected = "head"),
DTOutput('tbl')),
server = function(input, output) {
if(input$disp == "head") {
return(head(iris))
}else if(input$disp == "setosa"){
return(iris[iris$Species == input$disp,])
}else if(input$disp == "versicolor"){
return(iris[iris$Species == input$disp,])
}
else {
return(iris)
}
output$tbl = renderDT(
DT::datatable(
iris,extensions = 'Responsive'
)
)
}
)
Datatable still showing the data but "Responsive" does not work ...
this is example with "iris" my real data have more column that iris have...
Thanks