extract_prm: Extract values for Atlantis parameters from the biological...

Description Usage Arguments Value Examples

View source: R/extract-prm.R

Description

Extract values for Atlantis parameters from the biological parameter file.

Usage

1
2
3
extract_prm(prm_biol, variables)

extract_prm_cohort(prm_biol, variables)

Arguments

prm_biol

Character string giving the connection to the biological parameterfile. The filename usually contains biol_fishing and does end in .prm.

variables

Character string giving the flag to search for. This should be a combination of the parameter name and the group-Code.

Value

numeric vector.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
d <- system.file("extdata", "setas-model-new-trunk", package = "atlantistools")
prm_biol <- file.path(d, "VMPA_setas_biol_fishing_Trunk.prm")

# You can pass a single variable
extract_prm(prm_biol, variables = "KWRR_FVS")

# Or multiple variables
extract_prm(prm_biol, variables = paste("KWRR", c("FVS", "FPS"), sep = "_"))

# Use extract_prm_cohort do extract data for age specific parameters.
# They are usually stored in the next line following the parameter tag.
extract_prm_cohort(prm_biol, variables = "C_FVS")
extract_prm_cohort(prm_biol, variables = paste("C", c("FVS", "FPS"), sep = "_"))

atlantistools documentation built on Aug. 16, 2017, 9:05 a.m.