# Apps can be run without a server.r and ui.r file
runApp(list(
ui = fluidPage(
numericInput("n", "n", 20),
plotOutput("plot")
),
server = function(input, output) {
data <- reactive(head(cars, input$n))
output$plot <- renderPlot(plot(data()))
}
))
dummy_input <- list(n = 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.