Skip to content

random seed question

2 messages · Tib, Duncan Murdoch

#
On 1/5/2006 11:44 AM, Tib wrote:
Call them once, outside the loop.

What they do is move the RNG state between the R workspace and a place 
where the C functions can use it.  Wrapping each call in the loop in 
those calls will just generate a lot of unnecessary moves.  Not doing 
the calls, or not pairing them up properly, is the dangerous thing that 
would lead to damage to the RNG algorithms, because the state would not 
be updated properly.

Duncan Murdoch