Skip to content

Instantly share code, notes, and snippets.

@coleoguy
Created September 25, 2015 21:09
Show Gist options
  • Save coleoguy/d6c3a02be75af34507cf to your computer and use it in GitHub Desktop.
Save coleoguy/d6c3a02be75af34507cf to your computer and use it in GitHub Desktop.
library(shiny)
# Define UI for application
shinyUI(fluidPage(
# Application title
titlePanel("Brownian Motion"),
# Sidebar for user input
sidebarLayout(
sidebarPanel(
# select how many generations to run
sliderInput("gens",
"Generations:",
min = 10,
max = 500,
value = 500),
# select the number of replicates
sliderInput("reps",
"Replicates:",
min = 10,
max = 500,
value = 100),
# select the part to plot a histogram of
sliderInput("mon",
"Generation to plot:",
min = 10,
max = 500,
value = 100),
# refresh via a seed change
actionButton("seed.val", 'Refresh')
),
# Show a plot of the simulation result and make it a bit larger with height argument
mainPanel(
plotOutput("distPlot", height="600px")
)
)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment