Created
August 21, 2017 08:50
-
-
Save sanjayssane/45db576f4b56467445295ce844a2634f to your computer and use it in GitHub Desktop.
This file contains hidden or 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) | |
| # Define server logic required to draw a histogram | |
| function(input, output) { | |
| # Expression that generates a histogram. The expression is | |
| # wrapped in a call to renderPlot to indicate that: | |
| # | |
| # 1) It is "reactive" and therefore should be automatically | |
| # re-executed when inputs change | |
| # 2) Its output type is a plot | |
| output$distPlot <- renderPlot({ | |
| x <- faithful[, 2] # Old Faithful Geyser data | |
| bins <- seq(min(x), max(x), length.out = input$bins + 1) | |
| # draw the histogram with the specified number of bins | |
| hist(x, breaks = bins, col = 'darkgray', border = 'white') | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment