[R] R: simulation
Dimitris Rizopoulos
dimitris.rizopoulos at med.kuleuven.ac.be
Fri Mar 4 13:11:18 CET 2005
look at ?set.seed, e.g.,
rnorm. <- function(seed, ...){
set.seed(seed)
rnorm(...)
}
#########
rnorm.(100, 1, 2)
I hope it helps.
Best,
Dimitris
----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/336899
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm
----- Original Message -----
From: "Clark Allan" <Allan at stats.uct.ac.za>
To: <r-help at stat.math.ethz.ch>
Sent: Friday, March 04, 2005 12:07 PM
Subject: [R] R: simulation
> hi all
>
> a simple question
>
> 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?
>
> please supply an example
>
> regards
> Allan
--------------------------------------------------------------------------------
> ______________________________________________
> R-help at 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
More information about the R-help
mailing list