Title: | Marine Benthic Ecosystem Analysis |
---|---|
Description: | Preprocessing tools and biodiversity measures (species abundance, species richness, population heterogeneity and sensitivity) for analysing marine benthic data. See Van Loon et al. (2015) <doi:10.1016/j.seares.2015.05.002> for an application of these tools. |
Authors: | Dennis Walvoort [aut, cre, cph] |
Maintainer: | Dennis Walvoort <[email protected]> |
License: | GPL (>= 3) |
Version: | 1.3-8 |
Built: | 2024-11-27 06:37:26 UTC |
Source: | CRAN |
benthos provides functions for facilitating the analysis of marine benthos data. Examples are indicators like species abundance, species richness, Margalef's index of diversity, Shannon's Entropy, AZTI's Marine Biotic Index, and the Infaunal Trophic Index (ITI). In addition functions for data pooling, genus-to-species conversion and validation and conversion of species names to those recommended by the World Register of Marine Species are provided.
All functions are designed to work seamlessly with the dplyr-package which implements a grammar for structured data manimpulation.
The benthos-package contains functions for estimating various species abundance, species richness, species heterogeneity and species sensitivity measures:
total abundance (total_abundance
)
abundance (abundance
)
species richness (species_richness
)
Margalef's index of diversity (margalef
)
Rygg's index of diversity (rygg
)
Hurlbert's Expected Number of Species (hurlbert
)
Simpson's measure of concentration (simpson
)
Hurlbert's probability of interspecific encounter (PIE) (hpie
)
Shannon's index or entropy (shannon
)
Hill's diversity number (hill
)
AZTI Marine Biotic Index (AMBI) (ambi
)
Infaunal Trophic Index (ITI) (iti
)
Bray-Curtis dissimilarity (bray_curtis
)
In addition, functions are available for data preparation, e.g.:
data pooling (pool
)
genus to species conversion (genus_to_species
)
For an overview of all the functions in the package click on the index link at the bottom of this page.
Dennis Walvoort [email protected]
The BEQI2-package on CRAN, and the package vignettes.
The number of indiviuals in each taxon.
abundance(.data = NULL, taxon = NULL, count) abundance_(.data = NULL, taxon = NULL, count)
abundance(.data = NULL, taxon = NULL, count) abundance_(.data = NULL, taxon = NULL, count)
.data |
data in a |
taxon |
name of column in |
count |
name of column in |
numeric
vector with abundance per taxon.
abundance_()
: version suitable for calling from a function
(see package lazyeval).
due to pooling, the abundance is not necessarily an integer
abundance( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(4, 6) )
abundance( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(4, 6) )
AZTI Marine Biotic Index (AMBI) according to Borja et al. (2000)
ambi(.data = NULL, taxon, count, group = NULL) ambi_(.data = NULL, taxon, count, group = NULL) has_ambi(.data = NULL, taxon, group = NULL) has_ambi_(.data = NULL, taxon, group = NULL)
ambi(.data = NULL, taxon, count, group = NULL) ambi_(.data = NULL, taxon, count, group = NULL) has_ambi(.data = NULL, taxon, group = NULL) has_ambi_(.data = NULL, taxon, group = NULL)
.data |
data in a |
taxon |
species names |
count |
counts of individuals ( |
group |
sensitivity groups I, II, III, IV, or V |
The index is given by:
where is the proportion of species in sensitivity group
.
numeric vector of length 1 containing the AMBI
ambi_()
: version suitable for calling from a function
(see package lazyeval).
has_ambi()
: tests if an AMBI sensitivity group is available for taxon
(returns TRUE
(available) or FALSE
(unavailable))
has_ambi_()
: version suitable for calling from a function
(see package lazyeval).
Borja, A., J. Franco and V. Perez, 2000. A Marine Biotic Index to Establish the Ecological Quality of Soft-Bottom Benthos Within European Estuarine and Coastal Environments. Marine Pollution Bulletin 40:1100-1114
ambi( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(4, 6) ) data(oosterschelde) has_ambi(oosterschelde, TAXON)
ambi( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(4, 6) ) data(oosterschelde) has_ambi(oosterschelde, TAXON)
Taxon names are standardized according to the World Register of Marine Species (WoRMS) database. The conversion is case-insensitive. For this conversion, the TWN-list (Taxa Water management the Netherlands) is used, extended with species of the Southern North Sea. See references below for download locations.
as_accepted(taxon, taxa = NULL)
as_accepted(taxon, taxa = NULL)
taxon |
|
taxa |
an optional table usually created with |
character vector with WoRMS/TWN compliant species names
https://www.marinespecies.org/
Bray-Curtis Dissimilarity
bray_curtis(n1, n2)
bray_curtis(n1, n2)
n1 |
abundances of species at site 1 |
n2 |
abundances of species at site 2 |
Bray-Curtis dissimilarity (0..1, 0 = equal, 1 = different)
species in n1 and n2 need to be aligned
n1 <- c(11, 0, 7, 8, 0) n2 <- c(24, 37, 5, 18, 1) bray_curtis(n1, n2)
n1 <- c(11, 0, 7, 8, 0) n2 <- c(24, 37, 5, 18, 1) bray_curtis(n1, n2)
The ecological quality ratio is the ratio beween a parameter value and its reference value:
Depending on bad
and ref
, the EQR usually
(but not necessarily!) varies between 0 (bad ecological quality) and 1 (
ecological quality equals the reference status).
eqr(x, bad, ref)
eqr(x, bad, ref)
x |
numeric vector containing benthic indices |
bad |
the value for a bad status |
ref |
the value for a reference status |
numeric vector with EQR-values: low values indicate bad ecological quality and high values indicate good ecological quality.
This alorithm reallocates the counts of taxa, that are only indentified at the genus level to taxa in the same sampling unit and of the same genus but that are identified on the species level. The redistribution of counts is proportional to the number of counts at the species level.
genus_to_species(is_genus, count)
genus_to_species(is_genus, count)
is_genus |
|
count |
|
numeric
vector with updated counts. The counts for the
taxon on the genus level have been set to zero.
Parameters is_genus
and count
are of the same length and
correspond to the same taxon.
The resulting counts are not necessarily integers.
genus_to_species(is_genus = c(TRUE, FALSE, FALSE), count = c(3, 10, 20)) genus_to_species(is_genus = c(TRUE, FALSE, FALSE), count = c(1, 10, 20))
genus_to_species(is_genus = c(TRUE, FALSE, FALSE), count = c(3, 10, 20)) genus_to_species(is_genus = c(TRUE, FALSE, FALSE), count = c(1, 10, 20))
This function gets sensitivity groups that are supplementary to the AMBI of Borja et al., (2000)
get_ambi(which = "NL")
get_ambi(which = "NL")
which |
which AMBI supplement? Currently only the Dutch supplement is
available ( |
a data frame with columns TAXON
containing taxa and
GROUP
containing Dutch AMBI-groups
Borja, A., J. Franco and V. Perez, 2000. A Marine Biotic Index to Establish the Ecological Quality of Soft-Bottom Benthos Within European Estuarine and Coastal Environments. Marine Pollution Bulletin 40:1100-1114
This function gets the sensitivity groups to estimate the infaunal trophic index of Gittenberger et al., (2011)
get_iti()
get_iti()
a data frame with columns TAXON
containing taxa and
GROUP
containing the ITI-groups of Gittenberger & Van Loon (2013).
Gittenberger A. and W. van Loon, 2013. Sensitivities of marine macrozoobenthos to environmental pressures in the Netherlands. Nederlandse Faunistische Mededelingen 41: 79-112.
Convert text to the most occuring case. In case of ties, the first occurence in sorted order will be taken.
harmonize(x)
harmonize(x)
x |
character vector |
character vector with harmonized names (i.e., same case)
x <- c("FOO", "Foo", "bar", "FOO", "bar", "FOO", "Bar") y <- harmonize(x) stopifnot(all.equal(y, c("FOO", "FOO", "bar", "FOO", "bar", "FOO", "bar")))
x <- c("FOO", "Foo", "bar", "FOO", "bar", "FOO", "Bar") y <- harmonize(x) stopifnot(all.equal(y, c("FOO", "FOO", "bar", "FOO", "bar", "FOO", "bar")))
According to Hill (1973): "a diversity number is figuratively a
measure of how many species are present if we examine the sample down to a
certain depth among its rarities. If we examine superficially (e.g.,
by using ) we shall see only the more abundant species. If we
look deeply (e.g., by using
) we shall see all the
species present."
Hill's diversity numbers are given by:
Special cases are:
reciprocal of the proportional abundance of the rarest species;
total number of species present;
exp(H), where H: Shannon's index (see also
shannon
);
reciprocal of Simpson's index (see also
simpson
);
reciprocal of the proportional abundance of the commonest species.
hill(.data = NULL, taxon, count, a = 0) hill_(.data = NULL, taxon, count, a = 0) hill0(.data = NULL, taxon, count) hill0_(.data = NULL, taxon, count) hill1(.data = NULL, taxon, count) hill1_(.data = NULL, taxon, count) hill2(.data = NULL, taxon, count) hill2_(.data = NULL, taxon, count)
hill(.data = NULL, taxon, count, a = 0) hill_(.data = NULL, taxon, count, a = 0) hill0(.data = NULL, taxon, count) hill0_(.data = NULL, taxon, count) hill1(.data = NULL, taxon, count) hill1_(.data = NULL, taxon, count) hill2(.data = NULL, taxon, count) hill2_(.data = NULL, taxon, count)
.data |
data in a |
taxon |
name of column in |
count |
name of column in |
a |
exponent in Hill's diversity number (R, with special cases for
|
numeric vector of Hill's numbers
hill_()
: version suitable for calling from a function
(see package lazyeval).
hill0()
:
hill0_()
: , version suitable for calling
from a function (see package lazyeval).
hill1()
:
hill1_()
: , version suitable for calling
from a function (see package lazyeval).
hill2()
:
hill2_()
: , version suitable for calling
from a function (see package lazyeval).
Hill, M.O., 1973. Diversity and Evenness: A Unifying Notation and Its Consequences. Ecology 54:427-432
species_richness
, shannon
,
simpson
hill( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(6, 12), a = 0 ) hill0( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(6, 12) )
hill( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(6, 12), a = 0 ) hill0( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(6, 12) )
The probability that two individuals selected at random (without replacement) from a sample will belong to different species is given by (Hurlbert, 1971, p.579, Eq. 3):
where (Hurlbert, 1971, p.579, Eq. 4) is the
probability that two individuals selected at random (with
replacement) from a sample will belong to different species:
where is the number of individuals of the ith
species in the community,
is the total number of individuals in the
community,
, and
is the number of
species in the community.
Note that Hurlbert's PIE
hpie
is the complement of
simpson
.
hpie(.data = NULL, taxon, count) hpie_(.data = NULL, taxon, count)
hpie(.data = NULL, taxon, count) hpie_(.data = NULL, taxon, count)
.data |
data in a |
taxon |
name of column in |
count |
name of column in |
A numeric vector with the probability of interspecific encounter (PIE).
hpie_()
: suitable for calling from a function
(see package lazyeval).
Hurlbert, S.H., 1971. The Nonconcept of Species Diversity: A Critique and Alternative Parameters. Ecology 52:577-586.
hpie( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(6, 12) )
hpie( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(6, 12) )
The expected number of species in a sample of n
individuals:
hurlbert(.data = NULL, taxon, count, n = 100L) hurlbert_(.data = NULL, taxon, count, n = 100L)
hurlbert(.data = NULL, taxon, count, n = 100L) hurlbert_(.data = NULL, taxon, count, n = 100L)
.data |
data in a |
taxon |
name of column in |
count |
name of column in |
n |
number of individuals in a standard sample |
expected number of species in a sample of n
individuals
hurlbert_()
: version suitable for calling from a function
(see package lazyeval).
Hurlbert, S.H., 1971. The Nonconcept of Species Diversity: A Critique and Alternative Parameters. Ecology 52:577-586.
hurlbert( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(4, 6), n = 8 )
hurlbert( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(4, 6), n = 8 )
Case-insensitive test for taxa starting with 'azoi'
is_azoic(x)
is_azoic(x)
x |
character vector containing taxa |
Azoic samples need special attention during data analysis. They should be marked as 'azoic', and taken care of during analysis. Note that an azoic sample is not the same as a record where a taxon has zero counts. The latter should be removed from further analysis, whereas the former provides important information.
logical vector, with elements TRUE
for azoic samples,
and FALSE
otherwise.
is_binomial
tests for valid binomial names,
generic_name
extracts the genus to which the species belongs,
specific_name
extracts the species within the genus.Binomial Names
is_binomial
tests for valid binomial names,
generic_name
extracts the genus to which the species belongs,
specific_name
extracts the species within the genus.
is_binomen(x) generic_name(x) specific_name(x) strip_sp(x)
is_binomen(x) generic_name(x) specific_name(x) strip_sp(x)
x |
|
character vector with either the generic name or the specific name of the species.
generic_name()
: extracts the genus to which the species belongs
specific_name()
: extracts the species within the genus
strip_sp()
: strips postfix sp. or spp. from a binomen
is_binomen("Venerupis corrugata") # TRUE generic_name("Venerupis corrugata") # Venerupis specific_name("Venerupis corrugata") # corrugata generic_name("venerupis corrugata") # NA (genus part should be capitalized)
is_binomen("Venerupis corrugata") # TRUE generic_name("Venerupis corrugata") # Venerupis specific_name("Venerupis corrugata") # corrugata generic_name("venerupis corrugata") # NA (genus part should be capitalized)
Computes the Infaunal Trophic Index (ITI) according to Gittenberger & van Loon (2013).
iti(.data = NULL, taxon, count, group = NULL) iti_(.data = NULL, taxon, count, group = NULL) has_iti(.data = NULL, taxon, group = NULL) has_iti_(.data = NULL, taxon, group = NULL)
iti(.data = NULL, taxon, count, group = NULL) iti_(.data = NULL, taxon, count, group = NULL) has_iti(.data = NULL, taxon, group = NULL) has_iti_(.data = NULL, taxon, group = NULL)
.data |
data in a |
taxon |
species names |
count |
counts of individuals ( |
group |
sensitivity groups I, II, III, or IV |
The Infaunal Trophic Index (ITI) is given by
where is the proportion of species in class
, where
group I are suspension feeders (highest quality);
group II are interface feeders
group III are surface deposit feeders and
group IV are subsurface deposit feeders (lowest quality).
numeric vector of length 1 containing the ITI
iti_()
: version suitable for calling from a function
(see package lazyeval).
has_iti()
: tests if an ITI sensitivity group is available for taxon
(returns TRUE
(available) or FALSE
(unavailable))
has_iti_()
: version suitable for calling from a function
(see package lazyeval).
Gittenberger A. and W. van Loon, 2013. Sensitivities of marine macrozoobenthos to environmental pressures in the Netherlands. Nederlandse Faunistische Mededelingen 41: 79-112.
iti(taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(4, 6)) data(oosterschelde) has_iti(oosterschelde, TAXON)
iti(taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(4, 6)) data(oosterschelde) has_iti(oosterschelde, TAXON)
Margalef Index of Diversity is given by
For , the index is set to 0.
margalef(.data = NULL, taxon, count) margalef_(.data = NULL, taxon, count)
margalef(.data = NULL, taxon, count) margalef_(.data = NULL, taxon, count)
.data |
data in a |
taxon |
taxa names ( |
count |
counts ( |
Margalef diversity index (numeric
vector
of length 1)
margalef_()
: version suitable for calling from a function
(see package lazyeval).
margalef( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(4, 6) )
margalef( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(4, 6) )
MWTL North Sea Bentos Data
northsea
northsea
An object of class tbl_df
(inherits from tbl
, data.frame
) with 24983 rows and 9 columns.
Oosterschelde data set. The Oosterschelde is located in the southwest of the Netherlands.
oosterschelde
oosterschelde
An object of class tbl_df
(inherits from tbl
, data.frame
) with 4269 rows and 8 columns.
The Oosterschelde data contains the following columns:
ID sample identifier
HABITAT specification of the habitat
AREA sampled area
DATE sampling date (YYYY-MM-DD, ISO 8601)
TAXON standardized taxon code (see WoRMS-website https://www.marinespecies.org/)
COUNT number of individuals of 'TAXON'
This is not the original data set, but a simplified version of it meant for didactic purposes only! For instance it only contains taxa identified at the species level. Other taxa have been removed.
Rijkswaterstaat Water, Transport and Living Environment, Department of Information Management, Lelystad, The Netherland (contact: [email protected])
This function randomly assigns samples to pools of approximately equal area
pool(sample_id = 1:length(area), area, target_area, max_try = 100L) .pool(sample_id = 1:length(area), area, target_area, max_try = 100L)
pool(sample_id = 1:length(area), area, target_area, max_try = 100L) .pool(sample_id = 1:length(area), area, target_area, max_try = 100L)
sample_id |
sample identifier |
area |
sampling area of |
target_area |
vector of length 2 containing the lower and upper bound
of the pooled area (same units as |
max_try |
maximum number of unsuccessful pooling tries before the algorithm gives up. |
vector with idenitifiers (integers) indicating the pool to which each sample belongs (NA for samples that could not be pooled)
.pool()
: internal function not supposed to be called directly.
This function reads and checks files with AMBI sensitivity data. The data should be stored in 'comma separated values' format (csv) consisting of two columns:
TAXON species name;
GROUP Roman numeral (I, II, III, IV, V) giving the sensitivity group
read_ambi(filename) validate_ambi(.data)
read_ambi(filename) validate_ambi(.data)
filename |
name of the AMBI sensitivity file (character) |
.data |
table in AMBI-format |
The function performs the following tasks:
checks the existence of filename
;
checks availablitity of required columns (case insensitive);
removes redundant spaces;
removes duplicated records.
validate_ambi()
: validator for AMBI-format
Borja, A., J. Franco and V. Perez, 2000. A Marine Biotic Index to Establish the Ecological Quality of Soft-Bottom Benthos Within European Estuarine and Coastal Environments. Marine Pollution Bulletin 40:1100-1114
This function reads and checks BEQI2 input files. The format has been specified in Van Loon (2013) and is described in the vignette of the BENMMI-package.
read_beqi2(filename) validate_beqi2(.data)
read_beqi2(filename) validate_beqi2(.data)
filename |
name of BEQI2 input file ( |
.data |
table in BEQI2-format |
The function performs the following tasks:
checks the existence of filename
;
checks availablitity of required columns (case insensitive);
make column names with aggregation data case-insensitive;
removes redundant spaces;
checks if DATE-field adheres to ISO 8601 (YYYY-mm-dd);
constructs a unique identifier ID
by concatenating
columns OBJECTID
and DATE
;
checks that each ID
has a unique AREA
;
checks azoic samples for VALUE=0;
removes records with VALUE=0, not belonging to azoic samples;
checks VALUE-field on missing values;
checks if VALUE-field is an integer;
validate_beqi2()
: validator for BEQI2-format
Willem van Loon, 2013. BEQI2 INPUT FORMAT. See the package-vignette of the BENMMI-package.
This function reads and checks files containing Infaunal Trophic Index (ITI) data (Gittenberger & Van Loon, 2013)
read_iti(filename) validate_iti(.data)
read_iti(filename) validate_iti(.data)
filename |
name of the ITI file (character). |
.data |
table in ITI-format |
The function performs the following tasks:
checks the existence of filename
;
checks availablitity of required columns (case insensitive), i.e., TAXON and GROUP;
removes redundant spaces;
removes duplicated records.
checks if all ITI classes are I, II, III, or IV
The column 'GROUP' contains the Roman numerals I, II, III, and IV, with the following meaning:
I: suspension feeders;
II: interface feeders;
III: surface deposit feeders;
IV: subsurface deposit feeders.
A data frame with columns TAXON
containing taxa and
GROUP
containing user-defined ITI-groups
(see Gittenberger & Van Loon, 2013).
validate_iti()
: validator for ITI-format
Gittenberger A. and W. van Loon, 2013. Sensitivities of marine macrozoobenthos to environmental pressures in the Netherlands. Nederlandse Faunistische Mededelingen 41: 79-112.
This function reads and checks files with reference values
read_ref(filename, indicators = c("S", "H", "AMBI")) validate_ref(.data, indicators = c("S", "H", "AMBI"))
read_ref(filename, indicators = c("S", "H", "AMBI")) validate_ref(.data, indicators = c("S", "H", "AMBI"))
filename |
name of the habitat reference file ( |
indicators |
indicators to be processed ( |
.data |
table in REF-format |
The function performs the following tasks:
checks the existence of filename
;
checks availablitity of required columns (case insensitive);
removes redundant spaces
removes duplicated records
Argument indicators
is a character
vector of additional benthic
indicators to be checked for. For example, if indicators = "ITI"
, then
the habitat reference file should also contain columns ITIREF and ITIBAD.
Implemented indicators are N, LNN, S, D, SN, SNA, H, L, AMBI, ITI, PIE, N2 (see package vignette).
The format of the habitat reference file is documented in the BEQI2-package vignette.
validate_ref()
: validator for REF-format
Van Loon, W, 2013. Loon2013-BEQI2-Specs-Ecotopes-27nov.doc
This function reads files in the taxa format.
read_taxa(filename) get_taxa() validate_taxa(.data)
read_taxa(filename) get_taxa() validate_taxa(.data)
filename |
name of taxa file |
.data |
table in taxa-format |
Taxa files have the following format:
group taxonomic group
provided provided taxon name
accepted accepted taxon name
level taxonomic level
Other columns are allowed, but silently ingored.
get_taxa()
: get default taxa list (TWN list extended with species Southern North Sea)
validate_taxa()
: validator for taxa-format
This function reads files in the Taxa Waterbeheer Nederland (TWN) format.
read_twn(filename) get_worms() validate_twn(.data)
read_twn(filename) get_worms() validate_twn(.data)
filename |
name of TWN file ( |
.data |
table in TWN-format |
The function adds a new column taxon
. Its contents depending
on TWN-status:
status = 10 taxonname
status = 20 prefername
status = 80 parentname
a tibble
with four columns:
GROUP TWN/WoRMS taxon group
LEVEL TWN/WoRMS taxon level
FROM taxon name to convert from
TO taxon name to convert to
get_worms()
: get default WoRMS list (TWN list extended with species Southern North Sea)
validate_twn()
: validator for TWN-format
Rygg's index of diversity is given by
The adjusted version of Rygg's index which gives more consistent values
for smaller S=2, N=2, N=3
and S=3, N=3
is
rygg(.data = NULL, taxon, count, adjusted = FALSE) rygg_(.data = NULL, taxon, count, adjusted = FALSE)
rygg(.data = NULL, taxon, count, adjusted = FALSE) rygg_(.data = NULL, taxon, count, adjusted = FALSE)
.data |
data in a |
taxon |
taxa names ( |
count |
counts ( |
adjusted |
(defaults to |
Rygg's index of diversity (numeric
vector
of length 1)
rygg_()
: version suitable for calling from a function
(see package lazyeval).
Rygg's index is not defined for . For
,
rygg
returns
NA_real_
.
Rygg, B. (2006). Developing indices for quality-status classification of marine soft-bottom fauna in Norway. Norwegian Institute for Water Research, Oslo, Norway. NIVA Report SNO 5208-2006.
rygg( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(4, 6) )
rygg( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(4, 6) )
Compute entropy according to Shannon (1948)
shannon(.data = NULL, taxon, count, base = 2) shannon_(.data = NULL, taxon, count, base = 2)
shannon(.data = NULL, taxon, count, base = 2) shannon_(.data = NULL, taxon, count, base = 2)
.data |
data in a |
taxon |
taxa names ( |
count |
counts ( |
base |
the base with respect to which logarithms are computed. Defaults to 2 (unit: bits). |
Shannon's entropy
shannon_()
: version suitable for calling from a function
(see package lazyeval).
Shannon, C. E., 1948. A Mathematical Theory of Communication. Bell System Technical Journal 27: 379-423.
shannon( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(4, 6) )
shannon( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(4, 6) )
The probability that two inidividuals selected at random (with replacement, Hurlbert, 1971, p.579) from a sample will belong to the same species. For an infinite sample Simpson's Index is given by (Peet, 1974):
For a finite sample by:
where the proportion of the individuals in species
,
the number of individuals in species
(relative
abundance
), and the total number
of individuals (
total_abundance
). The finite sample case
has been implemented in function simpson
(and simpson_
).
simpson(.data = NULL, taxon, count) simpson_(.data = NULL, taxon, count)
simpson(.data = NULL, taxon, count) simpson_(.data = NULL, taxon, count)
.data |
data in a |
taxon |
name of column in |
count |
name of column in |
The probability that two inidividuals selected at random from a sample will belong to the same species.
simpson_()
: version suitable for calling from a function
(see package lazyeval).
Peet, R. K. 1974, The Measurement of Species Diversity. Annual Review of Ecology and Systematics 5:285-307.
simpson( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(6, 12) )
simpson( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(6, 12) )
Species richness () is defined as the number of taxa
(lowest identification level possible) per sampling unit
(data pool or box core sample).
species_richness(.data = NULL, taxon, count = NULL) species_richness_(.data = NULL, taxon, count = NULL)
species_richness(.data = NULL, taxon, count = NULL) species_richness_(.data = NULL, taxon, count = NULL)
.data |
data in a |
taxon |
taxa names ( |
count |
number of individuals for each taxon ( |
species richness (integer
vector of length 1)
species_richness_()
: version suitable for calling from a function
(see package lazyeval).
species_richness( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(4, 6) )
species_richness( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(4, 6) )
This function removes redundant spaces from character vectors
strip_spaces(x)
strip_spaces(x)
x |
character vector |
character vector without trailing or multiple spaces
Taxon names are standardized according to the World Register of Marine Species (WoRMS) database. The conversion is case-insensitive. For this conversion, the TWN-list (Taxa Water management the Netherlands) is used, extended with species of the Southern North Sea. See references below for download locations.
to_worms(taxon, worms = NULL) is_worms(.data = NULL, taxon) is_worms_(.data, taxon) is_accepted(.data = NULL, taxon) is_accepted_(.data, taxon)
to_worms(taxon, worms = NULL) is_worms(.data = NULL, taxon) is_worms_(.data, taxon) is_accepted(.data = NULL, taxon) is_accepted_(.data, taxon)
taxon |
|
worms |
an optional table usually created with |
.data |
data in a |
character vector with WoRMS compliant species names
TRUE
for WoRMS compliant species names,
FALSE
otherwise.
TRUE
for WoRMS/TWN compliant species names,
FALSE
otherwise.
is_worms()
: check if a taxon complies with WoRMS
is_worms_()
: as is_worms
but suitable for calling from a
function (see package lazyeval).
is_accepted()
: check if a taxon complies with WoRMS/TWN
is_accepted_()
: as is_accepted
but suitable for calling from a
function (see package lazyeval).
https://www.marinespecies.org/
The total number of individuals.
total_abundance(.data = NULL, count, na.rm = FALSE) total_abundance_(.data = NULL, count, na.rm = FALSE) lnn(.data = NULL, count, na.rm = FALSE) lnn_(.data = NULL, count, na.rm = FALSE)
total_abundance(.data = NULL, count, na.rm = FALSE) total_abundance_(.data = NULL, count, na.rm = FALSE) lnn(.data = NULL, count, na.rm = FALSE) lnn_(.data = NULL, count, na.rm = FALSE)
.data |
data in a |
count |
counts ( |
na.rm |
Should missing values (including |
total number of individuals (integer
)
total_abundance_()
: version suitable for calling from a function
(see package lazyeval).
lnn()
: natural log of total abundance + 1
(see package lazyeval).
lnn_()
: version of lnn suitable for calling from a function
(see package lazyeval).
total_abundance(count = c(4, 6))
total_abundance(count = c(4, 6))