[R] specify seed for Random Number Generator
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Tue Aug 16 23:22:41 CEST 2005
"Dhiren DSouza" <dhiren22 at hotmail.com> writes:
> I need to generate 100 I.I.D samples from an exponential distribution. I
> use rexp(100,parameter). Is there anyway to specify a seed to determine the
> first input for the uniform random number generator used to generate these
> exponentials?
Try set.seed()
--
O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list