whpt: Whalley Hawkes Paisley Trigg index

View source: R/whpt.R

whptR Documentation

Whalley Hawkes Paisley Trigg index

Description

\Sexpr[results=rd, stage=render]{ lifecycle::badge("maturing") }

This function calculates the Whalley Hawkes Paisley Trigg index (WHPT).

Usage

whpt(
  x,
  method = "uk",
  type = "ab",
  metric = "aspt",
  agg = FALSE,
  abucl = c(1, 9, 99, 999),
  exceptions = NULL,
  traceB = FALSE
)

Arguments

x

Result of aggregate_taxa().

method

The only choice is uk. Users can provide their own data.frame (see examples) with a column called Taxon, a column called ABUCLASS and a column called Scores.

type

Presence only po or abundance ab.

metric

Possible choices are aspt, ntaxa, bmwp.

agg

This option allows the composite family approach. It can be FALSE, TRUE or a data.frame. If FALSE no aggregation will be performed, while if TRUE aggregation will be performed according to the rules described in Details. A data.frame containing the aggregation rules can be provided by the user. This data.frame needs a column called Taxon containing the taxon to aggregate and a column called Correct_Taxon with the aggregation specifications. agg cannot be TRUE when a data.frame is provided as method.

abucl

Log abundance categories. Treshold are set to 1, 9, 99 and 999.

exceptions

Taxa that need to be exluded from the calculation. This option can be useful, for instance, to exclude an alien species belonging to an autochthonous family.

traceB

If set to TRUE a list as specified below will be returned.

Details

WHPT is a revision of BMWP and it takes into account the abundances of organisms. The following aggregation is used if agg is set equal to TRUE:

  1. Psychomyiidae (inc. Ecnomidae)

  2. Rhyacophilidae (inc. Glossomatidae)

  3. Ancylidae (inc. Acroloxidae)

  4. Gammaridae (inc. Crangonyctidae)

  5. Planariidae (inc. Dugesidae)

  6. Hydrobiidae (inc. Bithyniidae)

whpt() automatically check for parent-child pairs in the scoring system, see the return section for a definition. All the information used for WHPT calculation can be retrieved with the function show_scores.

Value

If traceB is set to TRUE a list with the following elements will be returned:

  • results Results of whpt().

  • taxa_df The data.frame used for the calculation containing the abundance of taxa receiving a score.

  • abu_df The data.frame containing abundance classes for each site.

  • whpt_df The data.frame used for the calculation containing scores for each site.

  • composite_taxa Taxa aggregated following the aggregation of the default method or set in agg.

  • exceptions A data.frame containing the changes made by excluding the taxa included in exceptions.

  • parent_child_pairs For instance in Spanish BMWP both Ferrissia and Planorbidae receive a score. Abundances of the higher taxonomic level need therefore to be adjusted by subtracting the abundances of the lower taxonomic level.

Acknowledgements

We thank Carol Fitzpatrick, Richard Chadd, Judy England and Rachel Stubbington for providing us with the most updated WHPT scores and algorithms.

See Also

as_biomonitor, aspt, bmwp

Examples

data(macro_ex)
data_bio <- as_biomonitor(macro_ex)
data_agr <- aggregate_taxa(data_bio)
whpt(data_agr)
whpt(data_agr, metric = "bmwp")
whpt(data_agr, type = "po", metric = "bmwp")

# take a look to the metrics used for whpt calculation
# only the first 6 rows of each database are shown

lapply(show_scores("whpt", "uk"), head)

alexology/biomonitoR documentation built on Oct. 10, 2024, 12:02 a.m.