Re: [Rd] random seed question

2006-01-05 Thread Duncan Murdoch
On 1/5/2006 11:44 AM, Tib wrote: > Greetings, > > I am trying to write a C++ subroutine of my random number generator. Based > on tutorial in Writing R Extensions, one should call GetRNGstate() before > and PutRNGstate() after calling R's random variate generation routines. Now > suppose my funct

Re: [Rd] random seed question

2006-01-05 Thread Liaw, Andy
Just one call to each that enclose the RNG calls will do, I believe. Andy From: Tib > > Greetings, > > I am trying to write a C++ subroutine of my random number > generator. Based > on tutorial in Writing R Extensions, one should call > GetRNGstate() before > and PutRNGstate() after calling

[Rd] random seed question

2006-01-05 Thread Tib
Greetings, I am trying to write a C++ subroutine of my random number generator. Based on tutorial in Writing R Extensions, one should call GetRNGstate() before and PutRNGstate() after calling R's random variate generation routines. Now suppose my function would generate n(n>1) numbers by a loop,