Transform the results of MFDB queries for use in an Rpath model

mfdb_rpath_params(area_data,
    survey_data,
    catch_data,
    consumption_data,
    create_rpath_params = stop("Set create_rpath_params = Rpath::create.rpath.params"),
    living_groups = character(0),
    detritus_groups = c("Detritus"))

Arguments

area_data

Results of an mfdb_area_size query, aggregating the whole area

survey_data

Results of an mfdb_sample_totalweight query, normally for one year, aggregated by the model's functional groups

catch_data

Results of an mfdb_sample_totalweight query, normally for one year, aggregated by the model's functional groups and 'vessel'

consumption_data

Results of an mfdb_stomach_preyweightratio query, aggregated by functional groups

living_groups

Additional Rpath groups of "Living" type

detritus_groups

Additional Rpath groups of "Detritus" type

create_rpath_params

RPath isn't currently in a public repository, so to avoid depending on it you need to give mfdb_rpath_params the Rpath function, i.e. Rpath::create.rpath.params.

Details

EwE requires stanzas and groups of stanzas, these are made up using the first and any other groupings in MFDB. For example, if survey_data was made with a query like mfdb_sample_totalweight(mdb, c('species', 'age'), ...), then the species will make up the generated stanza_groups, and age will make up the stanzas within those groups.

catch_data requires data that is also aggregated by vessel, this will be ignored for the purposes of deciding the stanza/stanza_group.

consumption_data treats prey groupings seperate to predator groupings, and all will be added to the diet matrix.

See mfdb_sample_totalweight for more information on how groupings can be used in queries.

Value

Returns an Rpath.params object populated with the provided data.

Examples

# See demo/example-ewe.R for a full-length example