summarize_zooplankton_data: Summarize ZooplanktonData species abundances based on...

Description Usage Arguments Value See Also

View source: R/summarise_zooplankton_data.R

Description

Averages ZooplanktonData objects by grouping varaibles from meta-data ($meta) or species list ($splist). Can be used to convert abundances to biomasses, to sum up species abundances to remove stages and to summarize species data over the entire water column or regions.

Usage

1
2
3
4
5
6
7
8
9
summarize_zooplankton_data(
  obj,
  sp_group = NULL,
  meta_group = NULL,
  meta_group_method = "depth_mean",
  biomass = FALSE,
  remove_noncont = FALSE,
  warnings = TRUE
)

Arguments

obj

ZooplanktonData object

sp_group

character indicating the new names of species matrix names. Sums up species names based on the new name. Can be used to collate species to remove stages ("species") or to collate species based on origin ("origin"; Atlantic vs Arctic). Use NULL if you do not want to change species matrix names.

meta_group

character vector of column names in $meta, which should be used to summarize the species data. Typically use c("expedition", "station", "lon", "lat", "date") for multinet data to summarize over the entire water column. Use NULL if you do not want to summarize species data based on meta data.

meta_group_method

character giving the method which should be used to summarize species data. Options:

  • "mean" takes a simple mean of based on values listed in meta_group argument.

  • "depth_mean" takes a depth averaged abundance/biomass using the values listed in meta_group argument. Requires from and to columns in $meta. The values for each species are multiplied by depth interval, summed up by meta_group and divided by summed depth interval. The unit is the original unit (n/m3 or weight/m3).

  • "depth_sum" same than above, but values are not divided by summed depth interval. Represents depth "integrated" values. The unit is n/m2 if the original unit was n/m3.

  • "sum" sums up ("integrates") abundances/biomasses for each species by meta_group

  • "total_sum" ignores species and sums up all abundance/biomass by meta_group.

biomass

logical indicating whether abundances should be converted to biomass. Requires the biomass_conv column in obj$splist.

remove_noncont

logical indicating whether non-continuous casts should be removed if meta_group_method = "depth_mean".

warnings

logical indicating whether the function should print warnings if it detects problems with data

Value

Returns a list of class ZooplanktonData. The list contains 3 data frames: $data (abundance data), $meta (meta-data), and $splist (species information).

See Also

Other ZooplanktonData: merge_zooplankton_data(), print.ZooplanktonData(), read_zooplankton_data(), subset.ZooplanktonData()


MikkoVihtakari/MarineDatabase documentation built on July 7, 2020, 2:16 a.m.