Skip to contents

This function generates random values from the random variable.

Arguments

n

Integer. Number of observations.

a

Numeric. If it is provided and has length n, values will be used in each realization.

b

Numeric. If it is provided and has length n, values will be used in each realization.

Value

A vector of numeric values.

See also

Examples


test <- rand_uniform(a = 1, b = 2)
test$gen(10)
#>  [1] 1.137069 1.133181 1.435886 1.456972 1.860435 1.704314 1.757486 1.501987
#>  [9] 1.211501 1.042683

test$gen(3, a = c(1,2,3), b = c(2,3,4))
#> [1] 1.903444 2.211401 3.661088