[Rd] Debug with set.seed()

Tong Wang wangtong at usc.edu
Sat Jun 2 01:16:50 CEST 2007


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
}



More information about the R-devel mailing list