sim_survey_parallel | R Documentation |
This function is a wrapper for sim_survey
except it allows for
many more total iterations to be run than sim_survey
before running
into RAM limitations. Unlike test_surveys
, this function retains
the full details of the survey and it may therefore be more useful for testing
alternate approaches to a stratified analysis for obtaining survey indices.
sim_survey_parallel(
sim,
n_sims = 1,
n_loops = 100,
cores = 1,
quiet = FALSE,
...
)
sim |
Simulation from |
n_sims |
Number of times to simulate a survey over the simulated population. Requesting a large number of simulations here may max out your RAM. |
n_loops |
Number of times to run the |
cores |
Number of cores to use in parallel. More cores should speed up the process. |
quiet |
Print message on what to expect for duration? |
... |
Arguments passed on to
|
sim_survey
is hard-wired here to be "light" to minimize object size.
Returns an object of the same structure as sim_survey
.
## This call runs a total of 25 simulations of the same survey over
## the same population (Note: total number of simulations are low to
## decrease computation time for the example)
sim <- sim_abundance(ages = 1:20, years = 1:5) %>%
sim_distribution(grid = make_grid(res = c(10, 10))) %>%
sim_survey_parallel(n_sims = 5, n_loops = 5, cores = 1,
q = sim_logistic(k = 2, x0 = 3),
quiet = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.