Created
April 17, 2014 09:25
-
-
Save RanaivosonHerimanitra/10968134 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) | |
# Define server logic for random distribution application | |
shinyServer(function(input, output,session) { | |
data <- reactive({ | |
dist <- switch(input$dist, | |
norm = rnorm, | |
unif = runif, | |
lnorm = rlnorm, | |
exp = rexp, | |
rnorm) | |
dist(input$n) | |
}) | |
# Generate a summary of the data | |
output$summary <- renderPrint({ | |
summary(data()) | |
}) | |
# Generate an HTML table view of the data | |
output$idmytable <- renderTable({ | |
data.frame(x=data()) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment