From ripley at stats.ox.ac.uk  Wed Jan  2 09:30:40 2008
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Wed, 2 Jan 2008 08:30:40 +0000 (GMT)
Subject: [Rd] setting the seed in standalone code using Rlib
In-Reply-To: <6730abff0801020016m41b73fb9o4e832b4785d98853@mail.gmail.com>
References: <6730abff0801020016m41b73fb9o4e832b4785d98853@mail.gmail.com>
Message-ID: <Pine.LNX.4.64.0801020819530.8546@gannet.stats.ox.ac.uk>

What is 'Rlib'?

Did you mean embedded R (libR), rather than standalone Rmath? 
Applications making use of libR are not 'standalone': they use almost all 
of the installed R files.

On Wed, 2 Jan 2008, David Faden wrote:

> Hi,
>
> Is the below -- setSeed -- an okay way to set the seed in standalone
> applications making use of Rlib? It seems to work as expected. Is
> there a better way to do it? (

It is the only documented way to set the seed in embedded R.  Should you 
have meant standalone Rmath, other ways are documented.

> I'm also looking at do_setseed but am
> unsure what to supply as op. findFun("set.seed", R_GlobalEnv)?) Thanks
> much.

do_setseed is not an exported entry point, so not available to most users 
of libR.

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



[Rd] setting the seed in standalone code using Rlib
Prof Brian Ripley