I'm using checkbox filters from crosstalk
to filter entries in a table made with reactable
.
I need a simple way to get the checkboxes to show the number of corresponding entries next to them.
Here's a minimal example of a table with checkbox filters:
Example.Rmd
---
title: "Filtering with crosstalk"
---
```{r}
library(reactable)
library(crosstalk)
data <- SharedData$new(iris)
filter_checkbox("species", "Species", data, ~Species)
reactable(data)
```
I need the checkboxes to show the number of corresponding entries next to them, like this:
What is the simplest way to do this?