Here is an example of how I "manually" add a HTML dependency to a datatable
. This works fine. When I try with attachDependencies
, the dependency is not attached.
library(DT)
library(htmltools)
dep <- htmlDependency(
name = "colResize",
version = "1.6.1",
src = normalizePath("colResize"),
script = "jquery.dataTables.colResize.js",
stylesheet = "jquery.dataTables.colResize.css",
all_files = FALSE
)
dat <- iris
datatable(
dat,
options = list(
colResize = list()
)
) %>% attachDependencies(dep, append = TRUE)
Why does this code not work?