So my question is exactly like this one, except that I'm interested in performing the operation within a crosstalk enabled context. So the complication arises from the fact that the do
object doesn't apply to a SharedData
object. It sounds like I just want too many things?
Here's the reprex for the plotly w/ the slicer (which is relevant because if I change the SharedData
too much the slicer gets wonky), suitable to be placed inside a markdown document. So how can I facet the following by Species?
library(plotly)
library(crosstalk)
iris_sh <- iris %>% group_by(Species) %>% SharedData$new()
filter_slider(id = "1", label = "whatevs",
sharedData = iris_sh, column = ~Sepal.Length)
plot_ly(iris_sh, x = ~Sepal.Width, y = ~Petal.Width, color = ~Species) %>% add_markers()