I would like to use a button to show/hide the rows of the DT table that have the same value in a column but retain one of the rows so it can be selected. I want this to be a client side operation as i would like continue to use the custom filter extension on all rows.
I suspect there is a JavaScript JS() function or callback that can be integrated with shiny R to manage this but do not have the expertise required to make it happen.
for example in the case below: we would hid all rows where there duplicate species but each species would have one row.
library(shiny)
library(DT)
shinyApp(
ui = fluidPage(DTOutput('tbl')),
server = function(input, output) {
output$tbl = renderDT(
iris, options = list(lengthChange = FALSE)
)
}
)
Thanks,
Aaron