Title: | Calculation of Freshwater Biotic Indices |
---|---|
Description: | Calculates a range of UK freshwater invertebrate biotic indices including BMWP, Whalley, WHPT, Habitat-specific BMWP, AWIC, LIFE and PSI. |
Authors: | Dr Rob Briers |
Maintainer: | Dr Rob Briers <[email protected]> |
License: | GPL-3 |
Version: | 0.1.3 |
Built: | 2024-11-09 03:06:40 UTC |
Source: | https://github.com/robbriers/biotic |
The biotic package provides a main calculation function, wrapper functions for easy calculation of specific indices and a data transposition function which can be used to prepare data for analysis when needed.
The main function is calcindex
which allows the
calculation of any of the indices implemented.
A function is provided for each of the individual indices to
allow for quick calculations. An example is
calcPSI
which implements calculation of the
PSI index of sedimentation impacts.
The transposedata
function allows for simple
conversion between the default format with taxa in rows and
samples in columns and the transpose of this.
The dataset is part of that derived from samples taken by David Lawson as part of his undergraduate research project in Spring 2015. Samples were collected using standard three-minute kick sampling techniques from sites on the River Almond, West Lothian, Scotland above and below significant weirs.
DataFrame
David Lawson, 2015
The dataset is part of that derived from samples taken by the Edinburgh Napier MSc Wildlife Biology and Conservation group in Spring 2015. Samples were collected using standard three-minute kick sampling techniques from sites on the Braid Burn within the Hermitage of Braid Local Nature Reserve, Edinburgh, Scotland. The data are recorded as alphabetic log abundance categories (A-E).
DataFrame
Rob Briers and MSc Wildlife Biology and Conservation students, 2015
Calculates AWIC index for invertebrate samples.
calcAWIC(df, type = "num")
calcAWIC(df, type = "num")
df |
A dataframe containing list of taxa in first column, followed by columns of abundances with sample names in header row. |
type |
Indicates format of data. Options are "num" for numeric data, "log" for integer log abundance categories (1-5) or "alpha" for alphabetic abundance categories (A-E). Default value is "num". |
A data frame consisting of a column of index values with samples in rows.
# calculate the AWIC index for the Green Burn dataset # data are numeric log abundance categories, so type is "log" calcAWIC(greenburn, "log")
# calculate the AWIC index for the Green Burn dataset # data are numeric log abundance categories, so type is "log" calcAWIC(greenburn, "log")
Calculates BMWP, ASPT and N-taxa index values for invertebrate samples.
calcBMWP(df, type = "num")
calcBMWP(df, type = "num")
df |
A dataframe containing list of taxa in first column, followed by columns of abundances with sample names in header row. |
type |
Indicates format of data. Options are "num" for numeric data, "log" for integer log abundance categories (1-5) or "alpha" for alphabetic abundance categories (A-E). Default value is "num". |
A data frame consisting of columns of index values with samples in rows.
# calculate the BMWP indices for the River Almond dataset # 'type' not specified as data are numeric abundances calcBMWP(almond)
# calculate the BMWP indices for the River Almond dataset # 'type' not specified as data are numeric abundances calcBMWP(almond)
Calculates a range of freshwater invertebrate biotic indices in use in the UK (based on family level identification). Currently calculates BMWP (N-taxa and ASPT), Whalley revised BMWP, Whalley habitat specific BWMP (riffle, pool and riffle/pool), LIFE, PSI, WHPT (presence-absence and abundance-weighted) and AWIC. For details of these indices see the vignette.
calcindex(df, index = "BMWP", type = "num")
calcindex(df, index = "BMWP", type = "num")
df |
A dataframe containing list of taxon names and their abundances
in samples, along with sample identifiers. Default format is for taxon
names to be in the first column and sample abundances in subsequent
columns with identifers as column headers. See built-in |
index |
A choice of index to be calculated. Defaults to |
type |
Indicates type of data being processed. Options are "num" for numeric data, "log" for integer log abundance categories (1-5) or "alpha" for alphabetic abundance categories (A-E). Default value is "num". |
A data frame consisting of columns of index values with samples in rows. The number of columns returned depends on the index selected.
# use the built-in River Almond dataset, numeric abundances # calculate the BMWP index for this dataset # 'index' and 'type' do not have to specified as defaults are used # ("BMWP" and "num") calcindex(almond) # calculate the PSI index for this dataset # type does not have to specified as default is used ("num") calcindex(almond, "PSI") # calculate the WHPT abundance-weighted index for this dataset calcindex(almond, "WHPT_AB") # example of processing data in alphabetic log abundance categories # using the 'type' argument # 'braidburn' dataset contains alphabetic log category data # see ?braidburn for details # calculate the Whalley revised BMWP index (including N-taxa and ASPT) calcindex(braidburn, "Whalley", "alpha") # example of processing data in numeric log abundance categories # using the 'type' argument # 'greenburn' dataset contains numeric log category data # see ?greenburn for details # calculate the LIFE index for this dataset calcindex(greenburn, "LIFE", "log")
# use the built-in River Almond dataset, numeric abundances # calculate the BMWP index for this dataset # 'index' and 'type' do not have to specified as defaults are used # ("BMWP" and "num") calcindex(almond) # calculate the PSI index for this dataset # type does not have to specified as default is used ("num") calcindex(almond, "PSI") # calculate the WHPT abundance-weighted index for this dataset calcindex(almond, "WHPT_AB") # example of processing data in alphabetic log abundance categories # using the 'type' argument # 'braidburn' dataset contains alphabetic log category data # see ?braidburn for details # calculate the Whalley revised BMWP index (including N-taxa and ASPT) calcindex(braidburn, "Whalley", "alpha") # example of processing data in numeric log abundance categories # using the 'type' argument # 'greenburn' dataset contains numeric log category data # see ?greenburn for details # calculate the LIFE index for this dataset calcindex(greenburn, "LIFE", "log")
Calculates LIFE index values for invertebrate samples.
calcLIFE(df, type = "num")
calcLIFE(df, type = "num")
df |
A dataframe containing list of taxa in first column, followed by columns of abundances with sample names in header row. |
type |
Indicates format of data. Options are "num" for numeric data, "log" for integer log abundance categories (1-5) or "alpha" for alphabetic abundance categories (A-E). Default value is "num". |
A data frame consisting of a column of index values with samples in rows.
# calculate the LIFE index for the River Almond dataset # data are numeric abundances, so type can be omitted ("num" is default) calcLIFE(almond)
# calculate the LIFE index for the River Almond dataset # data are numeric abundances, so type can be omitted ("num" is default) calcLIFE(almond)
Calculates Whalley pool-specific BMWP, ASPT and N-taxa indices for invertebrate samples.
calcPool(df, type = "num")
calcPool(df, type = "num")
df |
A dataframe containing list of taxa in first column, followed by columns of abundances with sample names in header row. |
type |
Indicates format of data. Options are "num" for numeric data, "log" for integer log abundance categories (1-5) or "alpha" for alphabetic abundance categories (A-E). Default value is "num". |
A data frame consisting of columns of index values with samples in rows.
# calculate the Whalley Pool BMWP indices for the Green Burn dataset # data are numeric log abundance categories, so type is "log" calcPool(greenburn, "log")
# calculate the Whalley Pool BMWP indices for the Green Burn dataset # data are numeric log abundance categories, so type is "log" calcPool(greenburn, "log")
Calculates PSI index for invertebrate samples. for invertebrate samples.
calcPSI(df, type = "num")
calcPSI(df, type = "num")
df |
A dataframe containing list of taxa in first column, followed by columns of abundances with sample names in header row. |
type |
Indicates format of data. Options are "num" for numeric data, "log" for integer log abundance categories (1-5) or "alpha" for alphabetic abundance categories (A-E). Default value is "num". |
A data frame consisting of a column of index values with samples in rows.
# calculate the PSI index for the Braid Burn dataset # data are alphabetic log abundance categories, so type is "alpha" calcPSI(braidburn, "alpha")
# calculate the PSI index for the Braid Burn dataset # data are alphabetic log abundance categories, so type is "alpha" calcPSI(braidburn, "alpha")
Calculates Whalley riffle-specific BMWP, ASPT and N-taxa indices for invertebrate samples.
calcRiffle(df, type = "num")
calcRiffle(df, type = "num")
df |
A dataframe containing list of taxa in first column, followed by columns of abundances with sample names in header row. |
type |
Indicates format of data. Options are "num" for numeric data, "log" for integer log abundance categories (1-5) or "alpha" for alphabetic abundance categories (A-E). Default value is "num". |
A data frame consisting of columns of index values with samples in rows.
# calculate the Whalley Riffle BMWP indices for the Braid Burn dataset # data are alphabetic log abundance categories, so type is "alpha" calcRiffle(braidburn, "alpha")
# calculate the Whalley Riffle BMWP indices for the Braid Burn dataset # data are alphabetic log abundance categories, so type is "alpha" calcRiffle(braidburn, "alpha")
Calculates Whalley riffle/pool-specific BMWP, ASPT and N-taxa indices for invertebrate samples.
calcRiffPool(df, type = "num")
calcRiffPool(df, type = "num")
df |
A dataframe containing list of taxa in first column, followed by columns of abundances with sample names in header row. |
type |
Indicates format of data. Options are "num" for numeric data, "log" for integer log abundance categories (1-5) or "alpha" for alphabetic abundance categories (A-E). Default value is "num". |
A data frame consisting of columns of index values with samples in rows.
# calculate the Whalley Riffle/Pool BMWP indices for the Braid Burn dataset # data are alphabetic log abundance categories, so type is "alpha" calcRiffPool(braidburn, "alpha")
# calculate the Whalley Riffle/Pool BMWP indices for the Braid Burn dataset # data are alphabetic log abundance categories, so type is "alpha" calcRiffPool(braidburn, "alpha")
Calculates Whalley revised BMWP, ASPT and N-taxa indices for invertebrate samples.
calcWhalley(df, type = "num")
calcWhalley(df, type = "num")
df |
A dataframe containing list of taxa in first column, followed by columns of abundances with sample names in header row. |
type |
Indicates format of data. Options are "num" for numeric data, "log" for integer log abundance categories (1-5) or "alpha" for alphabetic abundance categories (A-E). Default value is "num". |
A data frame consisting of columns of index values with samples in rows.
# calculate the Whalley revised BMWP indices for the Green Burn dataset # data are numeric log abundance categories, so type is "log" calcWhalley(greenburn, "log")
# calculate the Whalley revised BMWP indices for the Green Burn dataset # data are numeric log abundance categories, so type is "log" calcWhalley(greenburn, "log")
Calculates WHPT presence-only ASPT and N-taxa indices for invertebrate samples.
calcWHPT(df, type = "num")
calcWHPT(df, type = "num")
df |
A dataframe containing list of taxa in first column, followed by columns of abundances with sample names in header row. |
type |
Indicates format of data. Options are "num" for numeric data, "log" for integer log abundance categories (1-5) or "alpha" for alphabetic abundance categories (A-E). Default value is "num". |
A data frame consisting of columns of index values with samples in rows.
# calculate the WHPT presence-only indices for the Braid Burn dataset # data are alphabetic log abundance categories, so type is "alpha" calcWHPT(braidburn, "alpha")
# calculate the WHPT presence-only indices for the Braid Burn dataset # data are alphabetic log abundance categories, so type is "alpha" calcWHPT(braidburn, "alpha")
Calculates WHPT abundance-weighted ASPT and N-taxa indices for invertebrate samples.
calcWHPT_AB(df, type = "num")
calcWHPT_AB(df, type = "num")
df |
A dataframe containing list of taxa in first column, followed by columns of abundances with sample names in header row. |
type |
Indicates format of data. Options are "num" for numeric data, "log" for integer log abundance categories (1-5) or "alpha" for alphabetic abundance categories (A-E). Default value is "num". |
A data frame consisting of columns of index values with samples in rows.
# calculate the WHPT abundance-weighted indices for the River Almond dataset # data are numeric abundances, so type is "num" (can be omitted) calcWHPT_AB(almond, "num")
# calculate the WHPT abundance-weighted indices for the River Almond dataset # data are numeric abundances, so type is "num" (can be omitted) calcWHPT_AB(almond, "num")
Check the list of taxa present in the sample dataset against the list of scoring taxa within package to identify any non-scoring taxa in the samples (or spelling mistakes).
checktaxa(df)
checktaxa(df)
df |
A dataframe containing abundances of invertebrate taxa in different samples. |
A data frame containing the names of taxa that are not in the
list of scoring taxa, or NA
if all taxa are scoring.
# check the taxa in the built-in Braid Burn dataset # returns 'NA' if all taxa present have scores and are spelt correctly checktaxa(braidburn)
# check the taxa in the built-in Braid Burn dataset # returns 'NA' if all taxa present have scores and are spelt correctly checktaxa(braidburn)
The dataset is derived from samples taken by the Edinburgh Napier MSc Aquatic Ecosystem Management group in Autumn 2012. Samples were collected using standard three-minute kick sampling techniques from a site on the Green Burn, a tributary of the River Almond in West Lothian, Scotland. The data are recorded in numeric log abundance categories (1-5).
DataFrame
Rob Briers and MSc Aquatic Ecosystem Management students, 2012
Transposes a dataset, correctly processing column and row labels.
transposedata(df)
transposedata(df)
df |
A dataframe containing abundances of invertebrate taxa in different samples. |
A data frame transposing the input data, with row and column labels processed correctly.
# transpose the built-in River Almond dataset # this would have to be transposed back to original format for calculation transposedata(almond)
# transpose the built-in River Almond dataset # this would have to be transposed back to original format for calculation transposedata(almond)