I would like to know the proper way to add row borders styling and zebra stripes option to datatables created with the package DT in R.
Simple starter example:
library(DT)
datatable(iris)
Simple example with options:
datatable(head(iris, 20), options = list(
columnDefs = list(list(className = 'dt-center', targets = 4)),
pageLength = 5,
lengthMenu = c(5, 10, 15, 20)
))
Not sure why I received a down vote? Please let me know if anything is unclear or how to improve this question.
You can add the
stripe
androw-border
class to the table container:This will create the
table
container with both classes and the styling feature will be applied. You can add any other styling from the link you posted.