A bounded version of rnorm

rnorm_bounded(n, mean = 0, sd = 1, min = -Inf, max = Inf)

## Arguments

n number of observations. If length(n) > 1, the length is taken to be the number required. vector of means. vector of standard deviations. lower limits of the distribution. upper limits of the distribution.

## Value

Generates values with rnorm, bounded by [min, max]

## Examples

rnorm_bounded(10)
#>  [1]  0.1794026 -1.4209690  1.2553034  1.4312901 -0.8725433  0.8316406
#>  [7]  0.9937324  0.2792174 -1.0218208 -1.2175547