Re: [R] R: simulation

From: Lukas Meier <meier_at_stat.math.ethz.ch>
Date: Fri 04 Mar 2005 - 23:20:09 EST

Clark Allan writes:
> i want to run simulations in r. i however want the experiments to be
> repeated at a later time with exactly the same numbers by other users.
> can i set the random number seed for rnorm in some way?
>
> e.g. is there some arguement that goes with rnorm?

set.seed(79) ## replace 79 with another value if you don't like it rnorm(10)

Hope this helps,

Lukas

-- 
Lukas Meier				http://stat.ethz.ch/people/meier/
Seminar fuer Statistik			phone:	+41 44 632 35 04
ETH-Zentrum, LEO D6			fax:	+41 44 632 12 28
CH-8092 Zurich, Switzerland

______________________________________________
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 Sat Mar 05 00:53:24 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:40 EST