library(crosstalk)
library(leaflet)
library(DT)
# Wrap data frame in SharedData
sd <- SharedData$new(quakes[sample(nrow(quakes), 10),])
# Create a filter input
filter_select("magnitude", "Magnitude", sd, ~ifelse(mag > 4.5, "big", "not big"))
# Use SharedData like a dataframe with Crosstalk-enabled widgets
leaflet(sd) %>% addTiles() %>% addMarkers()
datatable(sd, width="100%")