I also wanted to get rid of the column filter elements at the bottom and your answer gave me an idea. Below is a minimal example how to obtain a stripped down DataTable with some custom column sizes.
library(shiny)
runApp(
list(
server=function(input, output, session) {
output$customtable = renderDataTable({
mtcars},
options=list(iDisplayLength=5, # initial number of records
aLengthMenu=c(5,10), # records/page options
bLengthChange=0, # show/hide records per page dropdown
bFilter=0, # global search box on/off
bInfo=0, # information on/off (how many records filtered, etc)
bAutoWidth=0, # automatic column width calculation, disable if passing column width via aoColumnDefs
aoColumnDefs = list(list(sWidth="300px", aTargets=c(list(0),list(1)))) # custom column size
)
)
},
ui=basicPage(
tagList(
singleton(
tags$head(
tags$style(type="text/css", "tfoot {display:none;}")
)
)
),
dataTableOutput('customtable')
)
)
)
T.