In article <6f6f0fd60910050629p28c99209jcd7836353fd2d754
@mail.gmail.com>, antonioparede...@gmail.com says...
> I'm running the following for loop to generate random variables in chunks of
> 60 at a time (l), here h is of order in millions (could be 5 to 6 millions),
> note that generating all the variables at once could have an impact on the
> final results

No, it will not. See this example code for an illustration:

set.seed(1)
rnorm(3)
rnorm(3)
set.seed(1)
rnorm(6)

So if you generate the six numbers three at a time or all at once gives 
exactly the same result.

So my suggestion is to generate all the numbers at once. That takes next 
to no time. Or, if it takes too much memory, generate for example a 
million at once, and repeat a few times.

-- 
Karl Ove Hufthammer

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to