search for: envs2

Displaying 2 results from an estimated 2 matches for "envs2".

Did you mean: envs
2018 Sep 12
2
Environments and parallel processing
While using parallelization R seems to clone all environments (that are normally passed by reference) that are returned from a child process. In particular, consider the following example: library(parallel) env1 <- new.env() envs2 <- lapply(1:4, function(x) env1) cl<-makeCluster(2, type="FORK") envs3 <- parLapply(cl, 1:4, function(x) env1) envs4 <- parLapply(cl, 1:4, function(x) capture.output(str(env1))) stopCluster(cl) First I make an environment (env1). Then using the non-parallel lapply I get a li...
2018 Sep 12
0
Environments and parallel processing
...uman <niek.bouman at keygene.com> wrote: > > While using parallelization R seems to clone all environments (that are normally passed by reference) that are returned from a child process. In particular, consider the following example: > library(parallel) > env1 <- new.env() > envs2 <- lapply(1:4, function(x) env1) > > cl<-makeCluster(2, type="FORK") > envs3 <- parLapply(cl, 1:4, function(x) env1) > envs4 <- parLapply(cl, 1:4, function(x) capture.output(str(env1))) > stopCluster(cl) > > First I make an environment (env1). Then using t...