Consider the following brief example
species <- split(iris, iris$Species)
p_species <- lapply(species, function(l){
l %>%
plot_ly(type = "scatter") %>%
add_trace(
x = ~Sepal.Length,
y = ~Petal.Length,
text = ~Species) %>%
add_trace(
x = ~Sepal.Width,
y = ~Petal.Width,
text = ~Species)
})
subplot(p_species, nrows = 2)
How do I create a drop down menu that lets me select the subplot I want? My goal is not to see the three of them in the same window but have the option to see each one separately.