Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
If I want to sample from a continuous uniform distribution with interval $(a,b]$, how can I do it in R? Or is it just the same as sampling from $(a,b)$ in R using
runif(1,min = a, max = b)
As shown in the R Documentation: runif will not generate either of the extreme values unless max = min or max-min is small compared to min, and in particular not for the default arguments.
So generally you don't have to worry about that.
Required, but never shown