~/code/R/
datatable(head(iris, 20), options = list( columnDefs = list(list(className = 'dt-center', targets = 5)), pageLength = 5, lengthMenu = c(5, 10, 15, 20) ))
# when rownames = FALSE, use 4 as the index of the Species column datatable(head(iris, 20), rownames = FALSE, options = list( columnDefs = list(list(className = 'dt-center', targets = 4)), pageLength = 5, lengthMenu = c(5, 10, 15, 20) ))
options(DT.options = list(pageLength = 5, language = list(search = 'Filter:')))
datatable(head(mtcars, 30), options = list( order = list(list(2, 'asc'), list(4, 'desc')) ))