Romain Francois wrote: > Le 08.02.2006 04:21, Taka Matzmoto a écrit : > > >>Hi R users >> >>This looks a simple question >> >>Is there any difference between between rnorm(1000,0,1) and running >>rnorm(500,0,1) twice in terms of outcome ? >> >>TM >> >> > > Not here : > > R> set.seed(1) > R> x <- rnorm(1000, 0, 1) > R> set.seed(1) > R> y <- rnorm(500, 0, 1) > R> z <- rnorm(500, 0, 1) > R> all(x == c(y,z)) > [1] TRUE > > Romain
Indeed! The pseudo-random number generator is initialized at the same state, and thus, returns the same 1000 pseudo-random numbers in both cases. So, no differences. Best, Philippe Grosjean ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
