View source: R/create_survey_diet.R
create_survey_diet | R Documentation |
Create survey diet observations from Atlantis output
create_survey_diet(dat, time, species, boxes, effic, selex)
dat |
A
The |
time |
The timing of the survey (a vector indicating specific time steps, which are typically associated with years) i.e., seq(365,10*3650,365) would be an annual survey for 10 years |
species |
The predator species to sample in the survey (a vector) |
boxes |
A matrix with two columns: 1) polygon: box ID's that are sampled 2) survArea: area sampled in that box |
effic |
Efficiency for each species: a matrix with nrow=length(species). Columns: species: the species name. Matches names in species efficiency: |
selex |
Selectivity at age. A dataframe defining selectivity at age for each species. Columns are: species: the species name. Matches names in species agecl: the age class that selectivity represents selex: the proportion selected relative to fully selected age classes (between 0 and 1) |
spex |
The specifications of Atlantis model (box-specific area, habitat, etc.) for now, from load_boxarea a dataframe with polygon and area column names |
The function takes consumption-at-age data from an Atlantis scenario
where the data was read in from Atlantis output using
load_detailed_diet_comp
. One does not need to use these functions
to create dat
, rather you must only ensure that the structure of
dat
is the same.
Currently, the function subsets the data by polygon and time,
and sums over layers. An efficiency (effic
) parameter is applied
that determines that proportion of fully selected fish that are captured
by the survey, then selectivity-at-age is applied.
This function works for specific defined species, specific defined polygons,
and specific defined time.
Returns a matrix similar to the input matrix, with atoutput tons of prey consumed columns: species, agecl, polygon, layer, time, atoutput –will sum over layers, but enter NA as layer to indicate all layers
Poseidon
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.