[R] how to initialize random seed properly ?

ryszard.czerminski@pharma.novartis.com ryszard.czerminski at pharma.novartis.com
Wed Jun 9 21:24:08 CEST 2004


I want to start R processes on multiple processors from single shell 
script
and I want all of them to have different random seeds.
One way of doing this is

        sleep 2 # (with 'sleep 1' I am often getting the same number)
               ...
        set.seed(unclass(Sys.time()))

Is there a simpler way without a need to sleep between invoking
different R processes ?

Ryszard




More information about the R-help mailing list