Produces an ordered vector of num
random values, scaled to be approximately
between 0 and upper
. This function can be used as a basis for certain types
of random sampling schemes. The logic is similar to generating order statistics
from an exponential distribution.
Value
A numeric vector of length num
, containing ordered values scaled
approximately between 0 and upper
.
Examples
ordvec(5, 100) # Generates 5 ordered numbers, max value around 100
#> [1] 0.06547516 42.52867174 57.17789557 60.90528288 68.28693648
ordvec(10, 10) # Generates 10 ordered numbers, max value around 10
#> [1] 0.6081884 0.7902343 4.3967765 5.1593303 5.3771760 5.5845999 6.4986165
#> [8] 8.0324132 8.9109897 9.3164617