utilMWRthresh {MassWateR}R Documentation

Get threshold lines from thresholdMWR

Description

Get threshold lines from thresholdMWR

Usage

utilMWRthresh(resdat, param, thresh, threshlab = NULL)

Arguments

resdat

results data as returned by readMWRresults

param

character string to first filter results by a parameter in "Characteristic Name"

thresh

character indicating if relevant freshwater or marine threshold lines are included, one of "fresh", "marine", or "none", or a single numeric value to override the values included with the package

threshlab

optional character string indicating legend label for the threshold, required only if thresh is numeric

Value

If thresh is not numeric and thresholds are available for param, a data.frame of relevant marine or freshwater thresholds, otherwise NULL. If thresh is numeric, a data.frame of the threshold with the appropriate label from threshlabel.

Examples

# results file path
respth <- system.file('extdata/ExampleResults.xlsx', package = 'MassWateR')

# results data
resdat <- readMWRresults(respth)

# get threshold lines
utilMWRthresh(resdat = resdat, param = 'E.coli', thresh = 'fresh')

# user-defined numeric threshold line
utilMWRthresh(resdat = resdat, param = 'TP', thresh = 5, threshlab = 'My threshold')

[Package MassWateR version 2.1.4 Index]