| Title: | A Synchronized Tausworthe RNG for R and Python |
|---|---|
| Description: | Generate the same random numbers in R and Python. |
| Authors: | Gertjan van den Burg <[email protected]> |
| Maintainer: | Gertjan van den Burg <[email protected]> |
| License: | GPL-2 |
| Version: | 1.3.3 |
| Built: | 2026-05-31 10:22:54 UTC |
| Source: | https://github.com/cran/SyncRNG |
See syncrng-package for package documentation.
seedThe seed for the random number generator
stateThe current state of the RNG, should not be modified by the user
initialize(..., seed = 0)Initialize the RNG using the C function R_syncrng_seed
rand()Generate a single random float in the range [0, 1)
randbelow(n)Generate a random integer below a given number
randi()Generate a single random 32-bit integer
shuffle(x)Randomly shuffle a provided array of values
s <- SyncRNG(seed=123456) for (i in 1:10) cat(s$randi(), '\n')s <- SyncRNG(seed=123456) for (i in 1:10) cat(s$randi(), '\n')