diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2017-12-18 09:39:49 -0500 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2017-12-18 09:39:49 -0500 |
| commit | 3a2fb08bf58d5889a4b71f06eb3033abfe6e43f1 (patch) | |
| tree | b04d5125af5982d9d13e1b4b129f56fa2e17988e | |
| parent | update master with python branch (diff) | |
| download | SyncRNG-3a2fb08bf58d5889a4b71f06eb3033abfe6e43f1.tar.gz SyncRNG-3a2fb08bf58d5889a4b71f06eb3033abfe6e43f1.zip | |
update readme with new R feature
| -rw-r--r-- | README.rst | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -15,6 +15,9 @@ SyncRNG is a Tausworthe RNG implemented in ``syncrng.c``, and linked to both R and Python. Since both use the same underlying C code, the random numbers will be the same in both languages, provided the same seed is used. +You can read more about my motivations for creating this `here +<https://gertjanvandenburg.com/blog/syncrng/>`_. + How === @@ -38,6 +41,21 @@ Similarly, after installing the R library you can do in R:: You'll notice that the random numbers are indeed the same. +R - User defined RNG +-------------------- + +R allows the user to define a custom random number generator, which is then +used for the common ``runif`` and ``rnorm`` functions in R. This has also been +implemented in SyncRNG as of version 1.3.0. To enable this, run:: + + library(SyncRNG) + + set.seed(123456, 'user', 'user') + runif(10) + +These numbers are between [0, 1) and multiplying by ``2**32 - 1`` gives the +same results as above. + Installation ============ @@ -67,4 +85,8 @@ Notes The random numbers are uniformly distributed on ``[0, 2^32 - 1]``. +Questions and Issues +==================== +If you have questions about SyncRNG or you encounter a problem, please open an +`issue on GitHub <https://github.com/GjjvdBurg/SyncRNG/>`_. |
