Hi Eric,

How about:

> set.seed(1234567)
> sample(1:100,10)
 [1] 57 72 90  3 74 46  9 81 95 78
> set.seed(1234567)
> sample(1:100,10)
 [1] 57 72 90  3 74 46  9 81 95 78
>

Cheers,

Anders.


On Mon, 5 Jan 2004, Eric ESPOSITO wrote:

> Hello,
> I already sent such an email before Christmas, but nobody answered, so here
> is my problem:
> I would like to sample a population but the result needs to be
> reproducible, using 'runif' or 'sample' is the good way to do it but I
> can't manage to make the results reproducible even with the 'set.seed'
> function.
> My aim is that th call to 'sample(1:100,10)' gives always the same result,
> how can I do that?
> Thanks!
>
> Eric Esposito
>
> ______________________________________________
> [EMAIL PROTECTED] mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to