Re: [R] R: simulation

From: Dimitris Rizopoulos <dimitris.rizopoulos_at_med.kuleuven.ac.be>
Date: Fri 04 Mar 2005 - 23:11:18 EST

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


> 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@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



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:35 2005

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