vis_sim: Make a flexdashboard for visualizing the simulation

Description Usage Arguments Examples

View source: R/vis_sim.R

Description

Assumes the working directory is the project directory

Usage

1
vis_sim(sim, ...)

Arguments

sim

Object produced by sim_abundance, sim_distribution, sim_survey or test_surveys.

...

Additional arguments to send to run

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
pop <- sim_abundance(ages = 1:20, years = 1:20)
vis_sim(pop)

dist <- sim_distribution(pop, grid = make_grid(res = c(10, 10)))
vis_sim(dist)

## Run one survey design
survey <- sim_survey(dist, n_sims = 5)
vis_sim(survey)

## Run several survey designs and assess stratified estimates
surveys <- expand_surveys(set_den = c(1, 2) / 1000,
                          lengths_cap = c(100, 500),
                          ages_cap = c(5, 20))
tests <- test_surveys(dist, surveys = surveys, keep_details = 1,
                      n_sims = 10, n_loops = 50, cores = 1)
vis_sim(tests)

SimSurvey documentation built on Jan. 16, 2021, 5:31 p.m.