Can piece of R code influence random numbers in foreach output?
问题 I run a simulation using foreach and doParallel and struggling with random numbers (named random in the code). In a nutshell: I simulate a football league, randomly generating winners of all the matches and corresponding results. In dt_base no match was played, in dt_ex1 and dt_ex2 results of 4 matches are known already. All unknown results should be simulated. In the League Simulation Code at the bottom of this post I set 1000 simulations, split into 100 chunks (the forloop is used to send