Description Usage Arguments Details Value Author(s) Examples
This function calculates all of the indicators described in this package. The user can choose whether the function returns the indicator dataframe to the global environment, exports the dataframe to a .csv file, or both. The user can also choose whether the function returns the raw indicator values, the standardized (z-score) values, or both.
1 2 3 4 5 6 7 8 9 | extractAll(X, X_length, land, speciesinfo.table, species.table, years,
metric.bio = "ABUNDANCE", group.bio = "ALL", percentiles = c(0.25,
0.75), minTL.bio = 0, LSI.group, max.length = 85, LFI.group,
large.fish = 35, LenWt.table, guild.groups, condition.groups,
ratio.groups, maxlength.group, TL.grouping = 1, wind = 5,
negative = FALSE, resource.groups, minTL.FiB = 0, TE = 0.1,
base.start, base.end, landings.groups, FP.groups, minTL.FP = c(0,
3.25), raw = TRUE, std = TRUE, glob.env = TRUE,
export.path = NULL, export.id = NULL)
|
X |
A dataframe of fishery independent data derived from research vessel
survey data or model output, with columns |
X_length |
A dataframe of fishery independent data derived from research
vessel survey data or model output, with columns |
land |
A dataframe of commercial landings data with columns |
speciesinfo.table |
A table with columns |
species.table |
A table where the column names match the entries in
|
years |
A vector of years for which to calculate indicators. |
metric.bio |
A character string indicating which column in |
group.bio |
A character string indicating which species to include in the
calculation of the Biodiversity indicators. If |
percentiles |
The percentiles used to determine R1 and R2 for calculating
Kempton's Q. Default is |
minTL.bio |
Minimum trophic level for species included to calculate
Kempton's Q. Default is |
LSI.group |
A character string indicating the species group for which to
calculate the Large Species Indicator. Must be set to |
max.length |
The threshold for large species (cm). Default is
|
LFI.group |
A character string indicating the species group for which to
calculate the Large Fish Indicator. Must be set to |
large.fish |
Threshold for large fish (cm). Default is |
LenWt.table |
A table of annual length at weight data with 5 columns.
|
guild.groups |
A vector indicating the species groups for which to
calculate the resource potential. Each entry must be a character string
matching the name of a column in |
condition.groups |
A vector indicating the species groups for which to
calculate Fulton's community condition factor. Each entry must be a
character string matching the name of a column in |
ratio.groups |
A dataframe with two columns, which must be named
|
maxlength.group |
A character string indicating the species group for
which to calculate the mean maximum length of fish in the community. Must be
set to |
TL.grouping |
Size of the trophic level bin for which to aggregate
biomass when calculating Biomass per Trophic Level. For example, if
|
wind |
Window for the moving average used to calculate the Coefficient of
Variation of the Biomass. The first and last |
negative |
If |
resource.groups |
A vector indicating the species groups for which to
calculate the resource potential. Each entry must be a character string
matching the name of a column in |
minTL.FiB |
The minimum trophic level of species to include to calculate Fishing-in-Balance. |
TE |
Trophic efficiency, used to calculate FiB. Default is |
base.start |
Year indicating the beginning of the baseline period for
calculating FiB. The average landings and average mean trophic level of the
landings over the baseline period are used as baseline values to calculate
FiB. |
base.end |
Year indicating the end of the baseline period for calculating
FiB. The average landings and average mean trophic level of the landings
over the baseline period are used as baseline values to calculate FiB.
|
landings.groups |
A vector indicating the species groups for which to
calculate the landings. Each entry must be a character string matching the
name of a column in |
FP.groups |
A dataframe with two columns, which must be named
|
minTL.FP |
A vector containing minimum trophic level to include when
calculating the mean trophic level of the landings. Default is |
raw |
A logical value. If |
std |
A logical value. If |
glob.env |
Logical value indicating whether to return output to global
environment. Default is |
export.path |
File path indicating where to save a .csv file of
calculated indicators (named allIndicators_export.id.csv; see below). If
|
export.id |
Character string to modify the name of the .csv file (if
export.path is specified), for example an area name or date of analysis. The
exported .csv file is named allIndicators_export.id.csv. Default is
|
This function calculates the indicators for each attribute and pressure: Biodiversity, Structure and Functioning, Stability and Resistance, Resource Potential, and Fishing Pressure.
See the help file for the individual functions for information on how each indicator is calculated.
Returns a dataframe with columns ID
, YEAR
, and
indicators corresponding to the arguments supplied to the function.
Standardized indicators are noted with "_s" in the name.
Danielle Dempsey Danielle.Dempsey@dfo-mpo.gc.ca, Adam Cook, Catalina Gomez, Alida Bundy
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # Compile data
data(X)
data(X_length)
data(land)
data(species.table)
data(species.info)
data(Length_Weight)
# Species groups of interest
trophicguild.groups <- c("LBENTHIVORE", "MBENTHIVORE", "PISCIVORE", "PLANKTIVORE",
"ZOOPISCIVORE")
condition.groups <- c("FINFISH", "PISCIVORE", "PLANKTIVORE", "ZOOPISCIVORE")
resource.groups <- c("ALL", "CLUPEIDS", "FINFISH", "FLATFISH", "FORAGE",
"GADOIDS", "GROUNDFISH", "PELAGIC", "SKATES")
ratio.groups <- data.frame(rbind(c("PELAGIC", "GROUNDFISH"), c("PREDATORS", "ALL")))
names(ratio.groups) <- c("group1", "group2")
landings.groups <- c("ALL", "CLUPEIDS.L", "FLATFISH.L", "GROUNDFISH.L")
FP.groups <- data.frame(rbind(c("ALL", "ALL"),
c("CLUPEIDS", "CLUPEIDS.L"),
c("FLATFISH", "FLATFISH.L"),
c("GROUNDFISH", "GROUNDFISH.L")))
names(FP.groups) <- c("group.X", "group.land")
# Calculate raw and standardized indicators
extractAll(X = X, X_length = X_length, land = land,
speciesinfo.table = species.info, species.table = species.table, years = c(2014:2019),
LSI.group = "ALL", LFI.group = "ALL", LenWt.table = Length_Weight,
guild.groups = trophicguild.groups, condition.groups = condition.groups,
ratio.groups = ratio.groups,
maxlength.group = "FINFISH",
resource.groups = resource.groups,
minTL.FiB = 0, base.start = 2014, base.end = 2015,
landings.groups = landings.groups, FP.groups = FP.groups,
raw = TRUE, std = TRUE, export.path = NULL)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.