Determines the biomass, consumption and production rates for each species in
the ecopath model and adds these to the species parameters. Ecopath works
with "groups" where mizer works with "species". The species_to_groups
parameter is a named list that maps Ecopath groups to mizer species. The
names must be the same as the species in species_params
and the values must
be the names of the corresponding Ecopath groups. Species in the mizer model
that are not mapped to groups in the Ecopath model are left unchanged.
Usage
addEcopathParams(species_params, ecopath_params, species_to_groups = list())
Value
The mizer species parameter data frame with the added columns
biomass_observed
, consumption_observed
, production_observed
and
ecopath_groups
.
Details
In case the Ecopath model has groups that are split into stanzas, then the
value in species_to_groups
should be a vector with the names of the stanzas
that need to be combined. The biomass, production and consumption of these
stanzas are added together to give the values for the corresponding mizer
species.
The species mapping from species_to_groups
is stored in the ecopath_groups
column of the species_params data frame. This column is a list column so that
it can store a vector of groups in the case where a species is made up of
several groups.
The biomasses are added to the species_params data frame in the
biomass_observed
column. The consumption rates are put into a
consumption_observed
column and the production rates are put into a
production_observed
column. The names of the Ecopath groups associated to
each mizer species are put into the ecopath_groups
column. This column is a
list column so that it can store a vector of groups in the case where a
species is made up of several groups.
If biomass_observed
, production_observed
or consumption_observed
columns
already have values differing from the Ecopath values, a warning is issued
and the values are overwritten.
If a species in species_params
is not found in species_to_groups
, a
message is issued and the species is skipped.