From http://stackoverflow.com/questions/43417374/crosstalks-filter-select-doesnt-filter-the-graph
library(crosstalk)
library(ggplot2)
library(gapminder)
library(plotly)
sd <- SharedData$new(gapminder)
w <- filter_select("country", "Country:", sd, ~ country)
g <- ggplot(sd, aes(year, lifeExp, color = country, group = country)) +
geom_line()
gg <- ggplotly(g)
bscols(w, gg)