From saptarshi.guha at gmail.com  Sun May  3 16:54:58 2009
From: saptarshi.guha at gmail.com (Saptarshi Guha)
Date: Sun, 3 May 2009 10:54:58 -0400
Subject: [Rd] set.seed and /dev/random
In-Reply-To: <18940.54621.1986.309356@ron.nulle.part>
References: <1e7471d50905021553s57857f87gbfcbdabedc006b79@mail.gmail.com>
	<18940.54621.1986.309356@ron.nulle.part>
Message-ID: <1e7471d50905030754pc194825v51d8b0ab16548097@mail.gmail.com>

Interesting stuff.
Thank you

Saptarshi



On Sat, May 2, 2009 at 7:21 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
>
> On 2 May 2009 at 18:53, Saptarshi Guha wrote:
> | Hello,
> | In ?set.seed I notice that a seed is created from the system time.
> | Thus if two machines were (hypothetically) running for the same time
> | and R was started simultaneously on both, the would have the same
> | seeds (correct?).
> |
> | I assume reading from /dev/random would be different for both of these
> | machines, so my question is why not use an integer read from
> | /dev/random to create the seed?
>
> Some folks do. But do read the fine print about entropy etc.
>
> An alternnative is provided by the random package on CRAN (slightly
> re-indented below).
>
> Dirk
>
>
> R> library(help=random)
>
> ? ? ? ? ? ? ? ?Information on package 'random'
>
> Description:
>
> Package: ? ? ? random
> Version: ? ? ? 0.2.0
> Date: ? ? ? ? ?$Date: 2009-01-03 11:45:17 -0600 (Sat, 03 Jan 2009) $
> Author: ? ? ? ?Dirk Eddelbuettel <edd at debian.org>
> Maintainer: ? ?Dirk Eddelbuettel <edd at debian.org>
> Title: ? ? ? ? True random numbers using random.org
> Description: ? This package provides an interface to the true random number
> ? ? ? ? ? ? ? service provided by the random.org website created by Mads
> ? ? ? ? ? ? ? Haahr. ?The random.org web service samples atmospheric noise
> ? ? ? ? ? ? ? via radio tuned to an unused broadcasting frequency together
> ? ? ? ? ? ? ? with a skew correction algorithm due to John von Neumann.
> ? ? ? ? ? ? ? More background is available in the included vignette based on
> ? ? ? ? ? ? ? an essay by Mads Haahr. In its current form, the package
> ? ? ? ? ? ? ? offers functions to retrieve random integers, randomized
> ? ? ? ? ? ? ? sequences and random strings.
> Depends: ? ? ? R (>= 2.8.0)
> License: ? ? ? GPL Version 2
> URL: ? ? ? ? ? http://www.random.org
> Built: ? ? ? ? R 2.8.1; ; 2009-01-03 11:46:25; unix
>
> Index:
>
> random ? ? ? ? ? ? ? ? ?True random numbers from random.org
>
> Further information is available in the following vignettes in directory
> '/usr/local/lib/R/site-library/random/doc':
>
> random-essay: random.org: Introduction to Randomness and Random Numbers (source, pdf)
> random-intro: random: An R package for true random numbers (source, pdf)
>
> R>
>
>
> | Would it be a portability issue?
> | I must admit I have very little idea about RNGs, so my question is
> | possibly very naive.
> |
> | Thank you
> | Saptarshi
> |
> | ______________________________________________
> | R-devel at r-project.org mailing list
> | https://stat.ethz.ch/mailman/listinfo/r-devel
>
> --
> Three out of two people have difficulties with fractions.
>



[Rd] set.seed and /dev/random
Saptarshi Guha