library(shiny) library(DT) data <- data.frame( a = 1:3, b = 2:4, c = 5:7 ) table <- DT::datatable( data, filter = "top", options = list( columnDefs = list( list( # this class name is also applied to the column title # not helpful for d3 className = 'dt-center', targets = 3, # by using the render function # I can retain the values in column c (5:7) # but in order to render a d3 plot # we need to append the value to a node # d3.select('.dt-center') render = DT::JS("function ( data, type, row, meta ) { //return d3.select(this).append('svg') }") ) ) ) ) ui <- fluidPage( tags$head( tags$script(src = "d3.js") ), table ) server <- function(input, output, session) { } shinyApp(ui, server)