Learn R Programming

marindicators (version 1.0.0)

resourcePotential: Calculates the Resource Potential of species groups

Description

This function calculates the Biomass or Abundance of a pre-defined group of species for \(j\) areas and \(i\) years.

Usage

resourcePotential(X, groups, species.table = NULL, metric = "BIOMASS",
  years)

Arguments

X

A dataframe of fishery independent data derived from research vessel survey data or model output, with columns YEAR, ID, SPECIES, and BIOMASS or ABUNDANCE. YEAR indicates the year the observation was recorded, ID is an area code indicating where the observation was recorded, SPECIES is a numeric code indicating the species sampled, and BIOMASS/ABUNDANCE is the corresponding biomass/abundance (stratified and corrected for catchability as required).

groups

A vector indicating the species group(s) for which to calculate the indicator. If groups = "ALL", all species will be included; otherwise, each entry must be a character string matching the name of a column in species.table.

species.table

A table where the column names match the entries in groups. Column entries are species codes indicating the species from X included in each group. species.table may also include columns for other species groups; these will be ignored. If groups = "ALL", this table is not required. Default is species.table = NULL.

metric

A character string indicating which column in X to use to calculate indicator. Default is metric = "BIOMASS".

years

A vector of years for which to calculate indicator.

Value

Returns a dataframe with columns ID and YEAR, and a column metric_group (e.g., BIOMASS_FINFISH) for each entry in groups.

If there is no data for a given year, the indicator value will be NA for that year.

Details

This indicator reflects temporal dynamics of species groups.

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.

See Also

Other resource potential indicators: allPotential, fishingInBalance

Examples

Run this code
# NOT RUN {
# Compile data
data(X)
data(species.table)

# Calculate total abundance and biomass
resourcePotential(X, groups = "ALL", metric = "ABUNDANCE", years = c(2014:2019))
resourcePotential(X, groups = "ALL", metric = "BIOMASS", years = c(2014:2019))

# Calculate biomass of trophic guilds
trophicguild.groups <- c("LBENTHIVORE", "MBENTHIVORE", "PISCIVORE", "PLANKTIVORE", "ZOOPISCIVORE")
resourcePotential(X, groups = trophicguild.groups,
   species.table = species.table, metric = "BIOMASS", years = c(2014:2019))

# Calculate biomass of fished groups
resource.groups <- c("ALL", "CLUPEIDS", "FINFISH", "FLATFISH", "FORAGE", "GADOIDS", "GROUNDFISH")
resourcePotential(X, groups = resource.groups, species.table = species.table,
   metric = "BIOMASS", years = c(2014:2019))
# }

Run the code above in your browser using DataLab