Created
January 4, 2018 10:58
-
-
Save Nicolabo/7d0a75740ef1a95ceda4a026c0ba13d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
options(shiny.autoreload = TRUE) | |
shinyServer(function(input, output) { | |
output$distPlot <- renderPlot({ | |
x <- faithful[, 2] | |
bins <- seq(min(x), max(x), length.out = input$bins + 1) | |
hist(x, breaks = bins, col = 'darkgray', border = 'white') | |
}) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
fluidPage( | |
titlePanel("Old Faithful Geyser Datass"), | |
sidebarLayout( | |
sidebarPanel( | |
sliderInput("bins", | |
"Number of bins:", | |
min = 1, | |
max = 50, | |
value = 30) | |
), | |
mainPanel( | |
plotOutput("distPlot") | |
) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment