library("dplyr") library("plotly") library("DT") data(iris) actionButton("setosa","Setosa!") actionButton("versicolor", "Versicolor!") rvs = reactiveValues(data = iris)
observeEvent(input$setosa, { rvs$data = filter(iris, Species == "setosa") }) observeEvent(input$versicolor, { rvs$data = filter(iris, Species == "versicolor") })
renderPlot({ plot(rvs$data$Petal.Width, rvs$data$Petal.Length) })
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.