Skip to contents

Draws from the ported .NET System.Random (the legacy Knuth subtractive generator). The same seed returns the identical stream in R, Python, and the upstream HEC-FDA C#.

Usage

rng_sequence(seed, n)

Arguments

seed

integer seed.

n

number of draws.

Value

numeric vector of n uniform draws on [0, 1).

Examples

rng_sequence(seed = 1234L, n = 5L)
#> [1] 0.3990810 0.8958995 0.3192029 0.9467375 0.3394360