Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

A quick look at the help page of the random number generator of R shows that you can choose among 7 predefined generators (Wichmann-Hill, Marsaglia-Multicarry, Super-Duper, Mersenne-Twister, Knuth-TAOCP-2002, Knuth-TAOCP, L'Ecuyer-CMRG).

?Random

The default is Mersenne-Twister, which seems to be very good. So why would you ever need to use another one?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

One case where this RNG cornucopia is handy is when you're rewriting or comparing software that rely on different RNGs. One example might be porting R code to C++. You want to pin down why you're getting different results and it helps to hold as many things constant as possible.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.