From wangtong at usc.edu  Sat Jun  2 01:16:50 2007
From: wangtong at usc.edu (Tong Wang)
Date: Fri, 01 Jun 2007 16:16:50 -0700
Subject: [Rd] Debug with set.seed()
Message-ID: <de14a0ea903e.46604672@usc.edu>

HI, all
    I am debugging an R code with dynamically loaded function in it.  It seems set.seed(n) does not give me the same 
random draws every time.  Could somebody tell me what I should do to get the same outcome verytime ?
    I am not sure what infomation is relevent to this question , the following is a really scatchy description of the code I wrote.I am using the R-2.4.1 built under Cygwin. OS is WinXP.

Thanks a lot  for any help.  
  
    Myfunction<-function(...) {
        .......
        drawsomething<-function(){  out<- .C( "drawit"...........)  
                                                             var <<- out$var  # assign the outputs}
        .......
        for( i in 1 : iter) { .........
                                    drawsomething()
                                    .......... }

       reture( var.stor )     #return stored result
}



[Rd] Debug with set.seed()
Tong Wang