combine_ages: Combine ageclasses to juvenile and adult stanza according to...

Description Usage Arguments Value Examples

View source: R/combine-ages.R

Description

Combine ageclasses to juvenile and adult stanza according to age at maturity.

Usage

1
combine_ages(data, grp_col, agemat, value_col = "atoutput")

Arguments

data

Dataframe with ageclass specific information.

grp_col

Character string giving the name of the group column in data. E.g. 'species', 'pred', 'prey' etc.

agemat

First mature age class for age structured groups. This dataframe should be generated with prm_to_df using "age_mat" as parameter.

value_col

Character string giving the name of the column to sum. Default is "atoutput".

Value

Dataframe with ageclasses combined to stanzas.

Examples

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

agemat <- prm_to_df(prm_biol = prm_biol, fgs = fgs,
                    group = get_age_acronyms(fgs = fgs),
                    parameter = "age_mat")

combine_ages(ref_nums, grp_col = "species", agemat = agemat)

alketh/atlantistools documentation built on Oct. 30, 2021, 5:46 a.m.