Use parLapply() instead of clusterCall() in jags.parallel(). (Again, I am not sure why the GitHub diff shows the whole file changed. I only changed a couple lines.)
Manage seeds on a chain-by-chain basis, not a core-by-core basis by pass the seed to .runjags().
Add a new testthat test (contributes to #1) to check that
jags.parallel() runs without error if n.chains is greater than n.cluster.
jags.parallel() returns an output object of class "rjags" with a BUGSoutput object of class "bugs".
The last parameter draws differ across chains (so each chain got its own seed).
The last parameter values are reproducible: repeated runs of jags.parallel() with the same seed produce identical sets of last values.
Fixes #4.
parLapply()
instead ofclusterCall()
injags.parallel()
. (Again, I am not sure why the GitHub diff shows the whole file changed. I only changed a couple lines.).runjags()
.testthat
test (contributes to #1) to check thatjags.parallel()
runs without error ifn.chains
is greater thann.cluster
.jags.parallel()
returns an output object of class"rjags"
with aBUGSoutput
object of class"bugs"
.jags.parallel()
with the same seed produce identical sets of last values.