parallel_mrgsim_d {mrgsim.parallel} | R Documentation |
Simulate a data set in parallel
Description
Use future_mrgsim_d()
to simulate with the future
package. Use
mc_mrgsim_d()
to simulate with parallel::mclapply
.
Usage
future_mrgsim_d(
mod,
data,
nchunk = 4,
...,
.as_list = FALSE,
.p = NULL,
.dry = FALSE,
.seed = TRUE,
.parallel = TRUE
)
mc_mrgsim_d(
mod,
data,
nchunk = 4,
...,
.as_list = FALSE,
.p = NULL,
.dry = FALSE,
.seed = NULL,
.parallel = TRUE
)
fu_mrgsim_d(
mod,
data,
nchunk = 4,
...,
.as_list = FALSE,
.p = NULL,
.dry = FALSE,
.seed = TRUE,
.parallel = TRUE
)
fu_mrgsim_d0(..., .dry = TRUE)
Arguments
mod |
The mrgsolve model object see mrgsolve::mrgmod. |
data |
Data set to simulate; see |
nchunk |
Number of chunks in which to split the data set |
... |
Passed to |
.as_list |
If |
.p |
Post processing function executed on the worker; arguments should be (1) the simulated output (2) the model object. |
.dry |
If |
.seed |
Passed to |
.parallel |
if |
Value
A data frame or list of simulated data.
See Also
Examples
mod <- mrgsolve::house()
data <- mrgsolve::expand.ev(amt = seq(10))
out <- future_mrgsim_d(mod, data, nchunk = 2)
[Package mrgsim.parallel version 0.2.1 Index]