Hi all,

I attempted to install "RSPRNG" package in OSX Lion by just selecting it from the Package Installer menu, and later realised it was a stupid idea! However, after the installation failed, the error "object '.lec.Random.seed.table' not found" appeared when I run the following code:

test = function( iter , cores )
{
    cl = makeCluster( cores , type = "SOCK" );
    clusterSetupRNG( cl );
    registerDoSNOW( cl );


    output = foreach( i = 1:iter , .combine = "rbind") %dopar%
    {
        runif( 1 , 0 , 1 );
    }

    stopCluster( cl );

output;
}

test( 100 , 2 )

The reason that I wanted to install "RSPRNG", is because I seemed to get the same "random" number stream every time when I run the code above.

My question is, 1) how can I fix the error. 2) How can I avoid getting the same random number stream for each nodes?

Many thanks
Terry

_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to