Hi everyone!
I have a DT column that includes escaped HTML, specifically numbers inside a div
. I'd like this column to be searchable with a slider as a numeric column, ignoring the styled div
, but I'm not quite sure how to execute. Any help or leads appreciated!
library(shiny)
test <- data.frame(
column = c("<div class='test'>1</div>", "<div class='test'>2</div>", "<div class='test'>3</div>"),
num = 1:3
)
ui <- fluidPage(
DT::dataTableOutput("example")
)
server <- function(input, output, session) {
output$example <- DT::renderDT({
dtable <- DT::datatable(test,
escape = FALSE,
filter = list(position = "top", plain = TRUE),
rownames = FALSE,
)
})
}
shinyApp(ui = ui, server = server)