Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.44.0401051847350.11827-100000@gannet.stats>
Date: 2004-01-05T18:50:54Z
From: Brian Ripley
Subject: runif and sample with reproducibility
In-Reply-To: <OFF132900B.CF0F4C6E-ON41256E12.00424078@notes.edfgdf.fr>

On Mon, 5 Jan 2004, Eric ESPOSITO wrote:

> Hello,
> I already sent such an email before Christmas, but nobody answered, so here

There *was* an answer posted, see the archives here:

https://www.stat.math.ethz.ch/pipermail/r-help/2003-December/042422.html

and none of the rest of us has any idea why this does not work for you
(if indeed it does not).

> 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

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595