Description Usage Arguments Value Examples
Evaluates a simulation function on each row of a data frame
containing parameter values, returns a single data frame with parameters
and simulation results. The function uses furrr::future_pmap
, which
allows for easy parallelization.
1 2 | evaluate_by_row(params, sim_function, ..., .progress = FALSE,
.options = future_options(), system_time = TRUE)
|
params |
data frame of simulation parameter values. Each row should represent a separate set of parameter values. |
sim_function |
function to be evaluated, with argument names matching
the variable names in |
... |
additional arguments passed to |
.progress |
A logical, for whether or not to print a progress bar for multiprocess, multisession, and multicore plans. |
.options |
The |
system_time |
logical indicating whether to print computation time.
|
A data frame containing parameter values and simulation results.
1 2 3 4 5 6 | df <- data.frame(
n = 3:5,
lambda = seq(8, 16, 4)
)
evaluate_by_row(df, rpois)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.