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

View source: R/darleq3_fun.R

darleqR Documentation

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

Description

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

Usage

darleq(
  inFile,
  sheet = NULL,
  metrics = c("TDI3", "TDI4", "TDI5LM"),
  outFile = NULL,
  verbose = TRUE
)

Arguments

inFile

Excel file name containing diatom and sample environmental data. See read_DARLEQ for acceptible formats for these data.

sheet

name of the worksheet in the Excel file to import.

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 metrics or "DAMLM" for river diatom acidification metric.

outFile

name of Excel file to save results. If not given the function will generate a name by concatenating "DARLEQ3_Results_" with the original filename, the sheet name and the current date.

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 read_DARLEQ calc_Metric_EQR and save_DARLEQ that imports data form an Excel file, calculates multiple metrics, EQRs and WFD classes and saves the results to another Excel file in one step.

Author(s)

Steve Juggins Stephen.Juggins@ncl.ac.uk

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

fn <- system.file("extdata/DARLEQ2TestData.xlsx", package="darleq3")
darleq(fn, outFile="Results.xlsx")


nsj3/darleq3 documentation built on Oct. 11, 2023, 4:37 a.m.