Created
November 6, 2012 02:25
-
-
Save wch/4022167 to your computer and use it in GitHub Desktop.
Basic histogram example
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) | |
| shinyServer(function(input, output) { | |
| output$main_plot <- reactivePlot(function() { | |
| hist(faithful$waiting, | |
| breaks = as.numeric(input$n_breaks), | |
| xlab = "Time to next eruption (minutes)", | |
| main = "Waiting times for Old Faithful geyser") | |
| }) | |
| }) |
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) | |
| shinyUI(bootstrapPage( | |
| selectInput(inputId = "n_breaks", | |
| label = "Approximate number of bins:", | |
| choices = c(5, 10, 20, 40)), | |
| plotOutput(outputId = "main_plot") | |
| )) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment