Normal Distribution Shiny app - Presentation

Alessandro Galletto
1/1/2020

My First Shiny Web App

  • I've wanted to see the normal distribution and I was curios for the seed functionality and how changes the histogram.
  • I order to have results reproducibility it is needed to have random variables but not so random and setting the seed is basic.
  • The web app is very simple but helps to visualize the normal distribution and also the impact of the different parameters.

UI sliders

Sliders used:

  • Seed: the seed slider allows us to have the same random samples one time and another.
  • Mean: mean of the random samples.
  • Standard deviation: standard deviation of the random samples.
  • Number of random samples: number of samples.

UI server parameters

The communication among ui and server side was made with the following parameters:

  • Input: seedpar, meanpar, sdpar, npar
  • Output: distPlot

Initial seed was set to:

set.seed(7)

Normal Distribution Histogram

Example of the calculation for the default histogram that is shown in the shiny app using the seed=7 calculated in the previous slide.

plot of chunk plot