g and even demanding that you explicitly
> convert things to a scalar in a context that needs it or to explicitly asking
> for recycling when you want it or ...
>
>
>
>
> -Original Message-
> From: R-devel On Behalf Of Henrik Bengtsson
> Sent: Friday, Sep
From: R-devel On Behalf Of Henrik Bengtsson
Sent: Friday, September 17, 2021 8:39 AM
To: GILLIBERT, Andre
Cc: R-devel
Subject: Re: [Rd] WISH: set.seed(seed) to produce error if length(seed) != 1
(now silent)
> I’m curious, other than proper programming practice, why?
Life's too short for
mits a warning when the condition has length >= 2,
> >> because it is often a bug. I would expect a warning or error with
> >> set.seed().
> >>
> >> Validating inputs and emitting errors early is a good practice.
> >>
> >> Just my 2 cents.
> >
ting errors early is a good practice.
Just my 2 cents.
Sincerely.
Andre GILLIBERT
-Message d'origine-
De : R-devel [mailto:r-devel-boun...@r-project.org] De la part de Avraham Adler
Envoyé : vendredi 17 septembre 2021 12:07
À : Henrik Bengtsson
Cc : R-devel
Objet : Re: [Rd] WISH: set.seed(seed) t
gt; Envoyé : vendredi 17 septembre 2021 12:07
> À : Henrik Bengtsson
> Cc : R-devel
> Objet : Re: [Rd] WISH: set.seed(seed) to produce error if length(seed) != 1
> (now silent)
>
> Hi, Henrik.
>
> I’m curious, other than proper programming practice, why?
>
> Avi
>
'origine-
De : R-devel [mailto:r-devel-boun...@r-project.org] De la part de Avraham Adler
Envoyé : vendredi 17 septembre 2021 12:07
À : Henrik Bengtsson
Cc : R-devel
Objet : Re: [Rd] WISH: set.seed(seed) to produce error if length(seed) != 1
(now silent)
Hi, Henrik.
I’m curious, other than pr
Hi, Henrik.
I’m curious, other than proper programming practice, why?
Avi
On Fri, Sep 17, 2021 at 11:48 AM Henrik Bengtsson <
henrik.bengts...@gmail.com> wrote:
> Hi,
>
> according to help("set.seed"), argument 'seed' to set.seed() should be:
>
> a single value, interpreted as an integer, or
Hi,
according to help("set.seed"), argument 'seed' to set.seed() should be:
a single value, interpreted as an integer, or NULL (see ‘Details’).
>From code inspection (src/main/RNG.c) and testing, it turns out that
if you pass a 'seed' with length greater than one, it silently uses
seed[1],