inst/shiny-scripts/app.R

library(shiny)
# This example is adapted from
# Grolemund, G. (2015). Learn Shiny - Video Tutorials. URL:https://shiny.rstudio.com/tutorial/

ui <- fluidPage(

  # Create title header
  titlePanel(tags$h1(tags$b("PopGenAnalysis:"),"View different plots for genetic Data")),
  sliderInput(inputId = "num",
              label = "Choose a number",
              value = 25, min = 1, max = 100),
  plotOutput("hist")
)

server <- function(input, output) {
  output$hist <- renderPlot({
    hist(rnorm(input$num),
         xlab = "Value",
         main = "Histogram of User Input Values")
  })
}
shiny::shinyApp(ui = ui, server = server)
# [END]
Heffley/PopGenAnalysis documentation built on Dec. 17, 2021, 10:32 p.m.