[R] Question on RNG

Ron Michael ron_michael70 at yahoo.com
Fri Aug 5 20:17:49 CEST 2011


Hi all, I have happened to work on MS .NET for sometime now, and I found that this language offers RNG what is called as Donald E. Knuth's subtractive random number generator algorithm (found here: http://msdn.microsoft.com/en-us/library/system.random.aspx#Y12).
 
Here I was wondering whether R also have same RNG in it's inventory, so looked at ?set.seed. There I found 2 related RNGs namely 'Knuth-TAOCP-2002', 'Knuth-TAOCP'. Can somebody guide me what is the most related RNG with .Net's?
 
I also want to have R to draw random number from that RNG, given I set a seed. My goal is to have same set of random numbers in .Net & R, so that I can match and see and compare the performance for some further calculations, which are based on random numbers in both .Net & R.
 
It will be really great to me if somebody can help me out.
 
Thanks,



More information about the R-help mailing list