runif_subrange: A subrange version of runif

View source: R/random_generators.R

runif_subrangeR Documentation

A subrange version of runif

Description

Will generate numbers from a random subrange within the given range. For example, if [min, max]is set to \[0, 10\], this function could decide to generaten' numbers between 2 and 6.

Usage

runif_subrange(n, min, max)

Arguments

n

Number of observations

min

Lower limits of the distribution.

max

Upper limits of the distribution.

Value

Generates values with runif, bounded by a range drawn from sort(runif(2, min, max)).

Examples

runif_subrange(20, 0, 10)

dyngen documentation built on Oct. 12, 2022, 5:06 p.m.