Package 'biotic'

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

Help Index


biotic: A package for calculating a range of UK freshwater invertebrate biotic indices.

Description

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.

Main function

The main function is calcindex which allows the calculation of any of the indices implemented.

Wrapper functions

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.

Data transposition function

The transposedata function allows for simple conversion between the default format with taxa in rows and samples in columns and the transpose of this.


River Almond invertebrate dataset

Description

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.

Format

DataFrame

Author(s)

David Lawson, 2015


Braid Burn invertebrate dataset

Description

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).

Format

DataFrame

Author(s)

Rob Briers and MSc Wildlife Biology and Conservation students, 2015


Calculate AWIC index

Description

Calculates AWIC index for invertebrate samples.

Usage

calcAWIC(df, type = "num")

Arguments

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".

Value

A data frame consisting of a column of index values with samples in rows.

Examples

# calculate the AWIC index for the Green Burn dataset
# data are numeric log abundance categories, so type is "log"

calcAWIC(greenburn, "log")

Calculate BMWP indices for invertebrate samples

Description

Calculates BMWP, ASPT and N-taxa index values for invertebrate samples.

Usage

calcBMWP(df, type = "num")

Arguments

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".

Value

A data frame consisting of columns of index values with samples in rows.

Examples

# calculate the BMWP indices for the River Almond dataset
# 'type' not specified as data are numeric abundances

calcBMWP(almond)

Calculate biotic indices for invertebrate samples

Description

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.

Usage

calcindex(df, index = "BMWP", type = "num")

Arguments

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 almond dataset for an example. If data are in the transposed format i.e taxa as columns and samples as rows, the transposedata function can be used prior to calculation.

index

A choice of index to be calculated. Defaults to "BMWP". Options are: "BMWP", "Whalley", "Riffle", "Pool", "RiffPool", "LIFE", "PSI", "WHPT", "WHPT_AB" and "AWIC".

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".

Value

A data frame consisting of columns of index values with samples in rows. The number of columns returned depends on the index selected.

Examples

# 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")

Calculate LIFE index

Description

Calculates LIFE index values for invertebrate samples.

Usage

calcLIFE(df, type = "num")

Arguments

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".

Value

A data frame consisting of a column of index values with samples in rows.

Examples

# calculate the LIFE index for the River Almond dataset
# data are numeric abundances, so type can be omitted ("num" is default)

calcLIFE(almond)

Calculate Whalley 'Pool' habitat-specific BMWP indices for invertebrate samples

Description

Calculates Whalley pool-specific BMWP, ASPT and N-taxa indices for invertebrate samples.

Usage

calcPool(df, type = "num")

Arguments

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".

Value

A data frame consisting of columns of index values with samples in rows.

Examples

# 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 PSI index

Description

Calculates PSI index for invertebrate samples. for invertebrate samples.

Usage

calcPSI(df, type = "num")

Arguments

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".

Value

A data frame consisting of a column of index values with samples in rows.

Examples

# calculate the PSI index for the Braid Burn dataset
# data are alphabetic log abundance categories, so type is "alpha"

calcPSI(braidburn, "alpha")

Calculate Whalley 'Riffle' habitat-specific BMWP indices for invertebrate samples

Description

Calculates Whalley riffle-specific BMWP, ASPT and N-taxa indices for invertebrate samples.

Usage

calcRiffle(df, type = "num")

Arguments

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".

Value

A data frame consisting of columns of index values with samples in rows.

Examples

# 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 Whalley 'Riffle/Pool' habitat-specific BMWP indices

Description

Calculates Whalley riffle/pool-specific BMWP, ASPT and N-taxa indices for invertebrate samples.

Usage

calcRiffPool(df, type = "num")

Arguments

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".

Value

A data frame consisting of columns of index values with samples in rows.

Examples

# 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 Whalley revised BMWP indices for invertebrate samples

Description

Calculates Whalley revised BMWP, ASPT and N-taxa indices for invertebrate samples.

Usage

calcWhalley(df, type = "num")

Arguments

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".

Value

A data frame consisting of columns of index values with samples in rows.

Examples

# 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 presence-only WHPT indices

Description

Calculates WHPT presence-only ASPT and N-taxa indices for invertebrate samples.

Usage

calcWHPT(df, type = "num")

Arguments

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".

Value

A data frame consisting of columns of index values with samples in rows.

Examples

# 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 abundance-weighted WHPT indices

Description

Calculates WHPT abundance-weighted ASPT and N-taxa indices for invertebrate samples.

Usage

calcWHPT_AB(df, type = "num")

Arguments

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".

Value

A data frame consisting of columns of index values with samples in rows.

Examples

# 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 taxa against scoring list

Description

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).

Usage

checktaxa(df)

Arguments

df

A dataframe containing abundances of invertebrate taxa in different samples.

Value

A data frame containing the names of taxa that are not in the list of scoring taxa, or NA if all taxa are scoring.

Examples

# check the taxa in the built-in Braid Burn dataset
# returns 'NA' if all taxa present have scores and are spelt correctly

checktaxa(braidburn)

Green Burn invertebrate dataset

Description

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).

Format

DataFrame

Author(s)

Rob Briers and MSc Aquatic Ecosystem Management students, 2012


Transpose data layout

Description

Transposes a dataset, correctly processing column and row labels.

Usage

transposedata(df)

Arguments

df

A dataframe containing abundances of invertebrate taxa in different samples.

Value

A data frame transposing the input data, with row and column labels processed correctly.

Examples

# transpose the built-in River Almond dataset
# this would have to be transposed back to original format for calculation

transposedata(almond)