How to implement fuzzy search in a Shiny data table?

I am trying to use this JS script (from this website: Fuzzy Search Plug-in) in a DT datatable:

var fsrco = $('#fuzzy-ranking').DataTable({
    fuzzySearch: {
        rankColumn: 3
    sort: [[3, 'desc']]
fsrco.on('draw', function(){
    fsrco.order([3, 'desc']);

Using this script tag:


I want to incorporate it in a DT datable function within a Shiny app where the fuzzy search is applied using the rank order (with higher similarity on top), however, I do not want the rank column to be shown.

Something like this, but without showing the Rank column.
enter image description here

Some base regular example:

    js <- c(
      "  var fsrco = $('#fuzzy-ranking').DataTable({",
      "    fuzzySearch: {",
      "        rankColumn: 3",
      "    },",
      "    sort: [[3, 'desc']]",
      "fsrco.on('draw', function(){",
      "    fsrco.order([3, 'desc']);",
    ui <- fluidPage(
    server <- function(input, output, session){
      output[["table"]] <- renderDT({
          selection = "none",
          editable = TRUE, 
          callback = JS(js),
          extensions = "KeyTable",
          options = list(
            keys = TRUE,
            url = "//"
    shinyApp(ui, server)

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.