Added original R code, changed default values in ui.R and made confidence level a numericInput instead of a slider.