how to make R parallel::parSapply run in absolute order of X? -
parsapply(cl = null, x, fun, ..., simplify = true, use.names = true)
by default run in random order of x. scheduled in order of x. possible?
scheduling in order of x not directly possible. there multiple ways around this. 1 of easy way use foreach option
.inorder=true
giving base example. please change based on need
t <- foreach(x=x,.inorder=true) %dopar % { fun }
Comments
Post a Comment