data(iris) selectInput("flower_choice", "Choose your flower", choices = unique(iris$Species))
renderText({ selected = iris[iris$Species == input$flower_choice,] mean(selected$Petal.Width) })
renderPlot({ selected = iris[iris$Species == input$flower_choice,] plot(selected$Petal.Width, selected$Petal.Length) })
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.