[R] difference between rnorm(1000, 0, 1) and running rnorm(500, 0, 1) twice

Bjørn-Helge Mevik bhs2 at mevik.net
Wed Feb 8 10:53:42 CET 2006


Why don't you test it yourself?

E.g.,

set.seed(42)
bob1 <- rnorm(1000,0,1)
set.seed(42)
bob2 <- rnorm(500,0,1)
bob3 <- rnorm(500,0,1)
identical(bob1, c(bob2, bob3))

I won't tell you the answer. :-)

-- 
Bjørn-Helge Mevik




More information about the R-help mailing list