Hi,
I am trying to plot a uniform distribution, with the second slider input being the issue. I want to have the maximum and minimum values of the slider change the endpoints of the uniform distribution, but i can't seem to get the two values for the two endpoints of the uniform distribution, out of the slider. Here are the relevant code sections from the server and ui files respectively.
Any help would be greatly appreciated.
#uniform distribution
conditionalPanel(
condition="input.illustration==\"unif\"",
sliderInput("unif.n",withMathJax(helpText("Number of observations : \\(n\\)")),min=-10,max=10,value=1,step=1),
sliderInput("unif.minmax",withMathJax(helpText("Lower and upper bounds : \\(minmax\\)")),min = -20, max = 20,value = c(-15,15))
),
if (input$illustration=="unif"){
par(mar=c(2.1,2.1,0.1,0.1))
n <- input$unif.n
minmax <- input$unif.minmax
x <- seq(0,10,length.out=500)
plot(x,dunif(x,minmax),type="l",xlab="",ylab="")
}