Learn R Programming

marindicators (version 1.0.0)

meanLengthCommunity: Calculates the Mean Length of the Community weighted by biomass or abundance

Description

This function calculates the Mean Length of the Community weighted by biomass or abundance for \(j\) areas and \(i\) years.

Usage

meanLengthCommunity(X_length, metric, years)

Arguments

X_length

A dataframe of fishery independent data derived from research vessel survey data or model output, with columns YEAR, ID, SPECIES, LENGTH, and BIOMASS. YEAR indicates the year the observation was recorded, ID is an area code indicating where the observation was recorded, and SPECIES is a numeric code indicating the species sampled. LENGTH is the length class (cm) and BIOMASS is the corresponding abundance at length (stratified and corrected for catchability as required). Species for which there are no length data should be assigned LENGTH = -99. These observations are removed by the function.

metric

A character string indicating which column in X to use to calculate indicator.

years

A vector of years for which to calculate indicator.

Value

Returns a dataframe with 3 columns. ID, YEAR, and MeanLength_metric.

If there is no data for spatial scale \(j\) in year \(i\), indicator value is assigned NA.

Details

$$MeanLength = \Sigma(Length_m * metric_i)/\Sigma metric_j$$ where \(Length_m\) is the length (cm) of an individual in size class \(m\), \(metric_i\) is the biomass or abundance of species \(i\) and \(metric_j\) is the total biomass or abundance of the community (Shin et al., 2010).

References

Bundy A, Gomez C, Cook AM. 2017. Guidance framework for the selection and evaluation of ecological indicators. Can. Tech. Rep. Fish. Aquat. Sci. 3232: xii + 212 p.

Shin, YJ, Shannon LJ, Bundy A, Coll M, Aydin K, Bez N, Blanchard JL, Borges, MF, Diallo I, Diaz E, Heymans JJ, Hill L, Johannesen E, Jouffre D, Kifani S, Labrosse P, Link JS, Mackinson S, Masski H, M<U+00F6>llmann C, Neira S, Ojaveer H, Abdallahi KM, Perry I, Thiao D, Yemane D, and Cury PM. 2010. Using indicators for evaluating, comparing and communicating the ecological status of exploited marine ecosystems. Part 2: Setting the scene. ICES Journal of Marine Science, 67: 692-716

Examples

Run this code
# NOT RUN {
data(X_length)
# Weighted by abundance
meanLengthCommunity(X_length, metric = "ABUNDANCE", years = c(2014:2019))
# Weighted by biomass
meanLengthCommunity(X_length, metric = "BIOMASS", years = c(2014:2019))
# }

Run the code above in your browser using DataLab