1

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()

Amit Kohli
  • 2,860
  • 2
  • 24
  • 44
  • 1
    For future readers: In R plotly [subplots](https://plotly.com/r/subplots/) can be used to get a similar output. Also see this [related post](https://stackoverflow.com/q/70943105/9841389). – ismirsehregal Feb 03 '22 at 15:22

0 Answers0