tests/testthat/shinyapp-appR/app.R

server <- function(input, output) {
  output$distPlot <- renderPlot({
    hist(rnorm(input$obs), col = "darkgray", border = "white")
  })
}
ui <- fluidPage(
  sidebarLayout(
    sidebarPanel(
      sliderInput("obs", "Number of observations:", min = 10, max = 500,
                  value = 100)),
    mainPanel(plotOutput("distPlot"))))
shinyApp(ui = ui, server = server)

Try the rsconnect package in your browser

Any scripts or data that you put into this service are public.

rsconnect documentation built on Oct. 4, 2023, 5:07 p.m.