Create matrix of random values drawn from uniform distribution

runifm(nrow, ncol, min = 0, max = 1)

Arguments

nrow

number of rows

ncol

numer of columns

min

lower limit of the distribution. Must be finite.

max

upper limit of the distribution. Must be finite.

Value

a matrix

Examples

runifm(3, 3)
#> [,1] [,2] [,3] #> [1,] 0.1746759 0.7793086 0.06521611 #> [2,] 0.5315735 0.2041783 0.35420680 #> [3,] 0.4936370 0.7133973 0.82519942
runifm(4, 5, min = -1, max = 3)
#> [,1] [,2] [,3] [,4] [,5] #> [1,] 0.09527298 -0.2339279 0.1143886 0.8639488 1.2396514 #> [2,] 1.28017980 2.7910558 0.7868099 0.5601255 2.4283343 #> [3,] 0.34287632 1.1699216 0.4860447 -0.9197391 0.5392388 #> [4,] 1.38505116 1.1784136 -0.8877561 0.5078837 1.1116681