lookup_table: Summary table of simulation parameters

Description Usage Arguments Details Value Examples

View source: R/data_handling.R

Description

lookup_table creates a table that summarises simulation parameters. The final table will have a line for each scenario and one column for each parameter requested with SVs.

Usage

1
2
3
4
5
6
7
8
9
lookup_table(
  data,
  project,
  scenario,
  pop = "Population 1",
  SVs = c("SV1"),
  save2disk = TRUE,
  dir_out = "ProcessedData"
)

Arguments

data

The output from collate_dat

project

Vortex project name (used to name the output)

scenario

Vortex scenario name (used to name the output)

pop

The name of the pop to be used as reference

SVs

The parameters to include in the table

save2disk

Whether to save the output to disk, default: TRUE

dir_out

The local path to store the output. Default: ProcessedData

Details

If the name of the populations were changed, the user has to indicate a population to be used as reference, otherwise lookup_table will look for a population named 'Population 1' (i.e. Vortex default name for the first population).

lookup_table reports the values of SVs at year zero. This is done because parameters may take value 'zero' if the relevant population goes extinct.There are cases where Vortex may not evaluate some parameters at year 0. This may happen, for example, when a population is empty at initialization (i.e. the initial population size is zero), or when K is set to zero at the beginning of the simulation. The user should check the values reported and check the Vortex input files if these do not look correct.

SVs can be any variable included in the data, including GS or PS set up in Vortex.

Value

A data.frame with scenario names and parameter values

Examples

1
2
3
4
5
6
# Using Pacioni et al. example data. See ?pac.clas for more details.
data(pac.clas)
lkup.st.classic <- lookup_table(data=pac.clas, project='Pacioni_et_al',
                   scenario='ST_Classic', pop='Population 1',
                   SVs=c('SV1', 'SV2', 'SV3', 'SV4', 'SV5', 'SV6', 'SV7'),
                   save2disk=FALSE)

vortexR documentation built on April 14, 2020, 7:23 p.m.