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

From: Romain Francois <francoisromain_at_free.fr>
Date: Wed 08 Feb 2006 - 19:51:26 EST

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
-- 
visit the R Graph Gallery : http://addictedtor.free.fr/graphiques
mixmod 1.7 is released : http://www-math.univ-fcomte.fr/mixmod/index.php
+---------------------------------------------------------------+
| Romain FRANCOIS - http://francoisromain.free.fr               |
| Doctorant INRIA Futurs / EDF                                  |
+---------------------------------------------------------------+

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Wed Feb 08 20:01:43 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:24 EST