how to do a uniform distribution on multiple mins and maxs
I'm looking to get a column of multiple uniform values based on a multiple min and max values
something like this:
x=c(1, 5, 6, 10)
runif(1, x, x+1)
Since runif
is vectorized, you can try the following one
> runif(length(x), x, x + 1)
[1] 1.054772 5.589664 6.313912 10.769576