[R] seed

Steve Lianoglou mailinglist.honeypot at gmail.com
Mon Apr 26 16:52:29 CEST 2010


Hi,

On Mon, Apr 26, 2010 at 10:45 AM, Jimmy Söderly <jimmy.soderly at gmail.com> wrote:
> Hi everybody,
>
> How can I set the seed for my simulations ? Is "set.seed(123456)" alright ?

Hmm ...

R> set.seed(123456)
R> rnorm(5)
[1]  0.83373317 -0.27604777 -0.35500184  0.08748742  2.25225573

R> rnorm(5)
[1]  0.8344601  1.3124155  2.5026454  1.1682317 -0.4261656

R> set.seed(123456)
R> rnorm(5)
[1]  0.83373317 -0.27604777 -0.35500184  0.08748742  2.25225573


-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



More information about the R-help mailing list