shinyApp(
ui = fluidPage(
numericInput("n", "n", 1),
plotOutput("plot")
),
server = function(input, output) {
output$plot <- renderPlot( plot(head(cars, input$n)) )
},
options=list(launch.browser = rstudio::viewer)
)
shinyAppDir(system.file("examples/01_hello", package="shiny"))
Run the code above in your browser using DataCamp Workspace