library(DT)
<- read.csv("data.csv")
rp datatable(rp,
caption = "Useful R packages for Ecology",
colnames = c("r package" = "r_package"),
filter = "top",
options = list(
autoWidth = TRUE,
initComplete = JS(
"function(settings, json) {",
"$(this.api().table().header()).css({'background-color': '#317eac', 'color': '#fff'});",
"}")),
%>%
) formatStyle("r package", fontFamily = "italic")