Description Usage Arguments Value Examples
Simulate stratifiedrandom survey
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  sim_survey(
sim,
n_sims = 1,
q = sim_logistic(),
trawl_dim = c(1.5, 0.02),
resample_cells = FALSE,
binom_error = TRUE,
min_sets = 2,
set_den = 2/1000,
lengths_cap = 500,
ages_cap = 10,
age_sampling = "stratified",
age_length_group = 1,
age_space_group = "division",
light = TRUE
)

sim 
Simulation from 
n_sims 
Number of surveys to simulate over the simulated population. Note: requesting
a large number of simulations may max out your RAM. Use

q 
Closure, such as 
trawl_dim 
Trawl width and distance (same units as grid) 
resample_cells 
Allow resampling of sampling units (grid cells)? Setting to TRUE may introduce bias because depletion is imposed at the cell level. 
binom_error 
Impose binomial error? Setting to FALSE may introduce bias in stratified estimates at older ages because of more frequent rounding to zero. 
min_sets 
Minimum number of sets per strat 
set_den 
Set density (number of sets per [grid unit] squared). WARNING:
may return an error if 
lengths_cap 
Maximum number of lengths measured per set 
ages_cap 
If 
age_sampling 
Should age sampling be "stratified" (default) or "random"? 
age_length_group 
Numeric value indicating the size of the length bins for stratified
age sampling. Ignored if 
age_space_group 
Should age sampling occur at the "division" (default), "strat" or "set" spatial scale?
That is, age sampling can be spread across each "division", "strat" or "set"
in each year to a maximum number within each length bin (cap is defined using
the 
light 
Drop some objects from the output to keep object size low? 
A list including rounded population simulation, set locations and details and sampling details. Note that that N = "true" population, I = population available to the survey, n = number caught by survey.
1 2 3 4  sim < sim_abundance(ages = 1:10, years = 1:5) %>%
sim_distribution(grid = make_grid(res = c(10, 10))) %>%
sim_survey(n_sims = 5, q = sim_logistic(k = 2, x0 = 3))
plot_survey(sim, which_year = 2, which_sim = 1)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.