[Rd] Debug with set.seed()

From: Tong Wang <wangtong_at_usc.edu>
Date: Fri, 01 Jun 2007 16:16:50 -0700


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
}

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 01 Jun 2007 - 23:20:39 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 03 Jun 2007 - 00:34:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.