data(cars)
shinyApp(
ui = fluidPage(
sliderInput("n", "n", 1, nrow(cars), 10),
plotOutput("plot")
),
server = function(input, output) {
output$plot <- renderPlot({
plot(head(cars, input$n), xlim = range(cars[[1]]), ylim = range(cars[[2]]))
})
}
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.