FreddyHernandez commited on
Commit
4ad3740
1 Parent(s): b680728

Update server.R

Browse files
Files changed (1) hide show
  1. server.R +15 -18
server.R CHANGED
@@ -1,18 +1,15 @@
1
- # This is the server logic for a Shiny web application.
2
- # You can find out more about building applications with Shiny here:
3
- # http://shiny.rstudio.com
4
- library(shiny)
5
- if (!require('gamlss')) install.packages("gamlss")
6
- library(gamlss)
7
- shinyServer(function(input, output) {
8
- output$distPlot <- renderPlot({
9
- # generate values of the ZIP distribution based on input$mu from ui.R
10
- x <- seq(0, input$xmax, 1)
11
- y <- dZIP(x, mu=input$mu, sigma=input$Prop)
12
- # draw the histogram with the specified number of bins
13
- barplot(y, main='Diagrama de barras para las probabilidades',
14
- xlab='x', ylab=expression(P(X==x)), las=1, col='deepskyblue3',
15
- names.arg = x, ylim=c(0, 1))
16
- grid()
17
- })
18
- })
 
1
+ library(shiny)
2
+ library(gamlss.dist)
3
+
4
+ shinyServer(function(input, output) {
5
+ output$distPlot <- renderPlot({
6
+ # generate values of the ZIP distribution based on input$mu from ui.R
7
+ x <- seq(0, input$xmax, 1)
8
+ y <- dZIP(x, mu=input$mu, sigma=input$Prop)
9
+ # draw the histogram with the specified number of bins
10
+ barplot(y, main='Diagrama de barras para las probabilidades',
11
+ xlab='x', ylab=expression(P(X==x)), las=1, col='deepskyblue3',
12
+ names.arg = x, ylim=c(0, 1))
13
+ grid()
14
+ })
15
+ })