I have a shiny example using renderDataTable() to create an output.
I have removed all possible options (paging, filtering, searching, etc). However, there is now a bla
You can use the sDom
option see http://legacy.datatables.net/usage/options#sDom for more details:
library(shiny)
runApp(list( ui =pageWithSidebar(
headerPanel("dataTable Example"),
sidebarPanel(
"This is a sidebar"
),
mainPanel(
p("Check out the gaps below."),
wellPanel(
dataTableOutput('example1')),
p("No gaps here because of searching and paging."),
wellPanel(
dataTableOutput('example2')
)
)
)
, server = function(input, output) {
x<-c(1,2,3,4,5)
y<-c('a','b','c','d','e')
test<-data.frame(x,y)
output$example1<-renderDataTable({test},options = list(iDisplayLength = 5,bSearchable = FALSE
,bFilter=FALSE,bPaginate=FALSE,bAutoWidth=TRUE
,bInfo=0,bSort=0
, "sDom" = "rt"
))
output$example2<-renderDataTable({test})
}
)
)