calc_Metric_EQR: Calculate diatom water quality metrics, EQRs and WFD class...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/calc_metric_eqr.R

Description

Calculate diatom water quality metrics, EQRs and WFD class for samples, and uncertainties of site classification

Usage

1
2
calc_Metric_EQR(x, metrics = "TDI5LM", truncate_EQR = TRUE,
  verbose = TRUE)

Arguments

x

list containing diatom and header (environmental) data. This will usually be the data structure imported by read_DARLEQ.

metrics

character vector of metric codes. Currently one or more of the following: "TDI3", "TDI4", "TDI5LM" (for river LM TDI calculations), "TDI5NGS" for river NGS metric, "LTDI1", "LTDI2" for lake LM TDI metric or "DAMLM" for river diatom acidification metric.

truncate_EQR

logical to truncate EQRs at 1.0

verbose

logical to indicate should function stop immediately on error (TRUE) or return a simpleError (FALSE). Defaults to TRUE.

Details

This is a wrapper function to calc_Metric and calc_EQR that calculates multiple metrics, EQRs and WFD classes. The output can be saved to an Excel file using function save_DARLEQ.

Value

A list with a named element for each metric calculated. Each element in the list is itself a list containing the output from calc_EQR (ie. the sample and site metrics, EQRs and WFD classes), and the job summary produced by calc_Metric.

Author(s)

Steve Juggins [email protected]

References

Kelly, M., S. Juggins, R. Guthrie, S. Pritchard, J. Jamieson, B. Rippey, H. Hirst, and M. Yallop, Assessment of ecological status in UK rivers using diatoms. Freshwater Biology, 2008. 403-422.

Juggins, S., M. Kelly, T. Allott, M. Kelly-Quinn, and D. Monteith, A Water Framework Directive-compatible metric for assessing acidification in UK and Irish rivers using diatoms. Science of The Total Environment, 2016. 671-678.

Bennion, H., M.G. Kelly, S. Juggins, M.L. Yallop, A. Burgess, J. Jamieson, and J. Krokowski, Assessment of ecological status in UK lakes using benthic diatoms. Freshwater Science, 2014. 639-654.

Examples

1
2
3
4
fn <- system.file("extdata/DARLEQ2TestData.xlsx", package="darleq3")
d <- read_DARLEQ(fn, "Rivers TDI Test Data")
x <- calc_Metric_EQR(d)
save_DARLEQ(x, outFile="results.xlsx")

nsj3/darleq3 documentation built on June 21, 2018, 8:01 a.m.