3

I am wondering if it is possible to filter the data on a second attribute/key when using crosstalk::SharedData?

I would like to modify the example:

Filter two tables with crosstalk

to introduce an additional variable e.g. sex, and to have an additional select_filter, which will enable me to subset the data by sex (male, female) first, before in addition selecting by owner.

witek
  • 984
  • 1
  • 8
  • 25

1 Answers1

0

I've been doing this by adding some filter_checkbox()'s and filter_select()'s. When I display these with bscols(filter_checkbox("sex", "Select sex", dt, ~sex), ggplotly(ggplot(dt, x = x, y = y), dynamicTicks = TRUE)) I can first filter based on the checkboxes and then still highlight things in the plot.

Japhir
  • 564
  • 3
  • 17