NZ GRS waiting list shiny app https://shiny.petras.space/GRS
rstats
statistics
rshiny
new-zealand
grs
transgender

app.R 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #
  2. # This is a Shiny web application. You can run the application by clicking
  3. # the 'Run App' button above.
  4. #
  5. # Find out more about building applications with Shiny here:
  6. #
  7. # http://shiny.rstudio.com/
  8. #
  9. library(shiny)
  10. # Define UI for application that draws a histogram
  11. ui <- fluidPage(
  12. # Application title
  13. titlePanel("Old Faithful Geyser Data"),
  14. # Sidebar with a slider input for number of bins
  15. sidebarLayout(
  16. sidebarPanel(
  17. sliderInput("bins",
  18. "Number of bins:",
  19. min = 1,
  20. max = 50,
  21. value = 30)
  22. ),
  23. # Show a plot of the generated distribution
  24. mainPanel(
  25. plotOutput("distPlot")
  26. )
  27. )
  28. )
  29. # Define server logic required to draw a histogram
  30. server <- function(input, output) {
  31. output$distPlot <- renderPlot({
  32. # generate bins based on input$bins from ui.R
  33. x <- faithful[, 2]
  34. bins <- seq(min(x), max(x), length.out = input$bins + 1)
  35. # draw the histogram with the specified number of bins
  36. hist(x, breaks = bins, col = 'darkgray', border = 'white')
  37. })
  38. }
  39. # Run the application
  40. shinyApp(ui = ui, server = server)