View source: R/utilMWRthresh.R
utilMWRthresh | R Documentation |
Get threshold lines from thresholdMWR
utilMWRthresh(resdat, param, thresh, threshlab = NULL)
resdat |
results data as returned by |
param |
character string to first filter results by a parameter in |
thresh |
character indicating if relevant freshwater or marine threshold lines are included, one of |
threshlab |
optional character string indicating legend label for the threshold, required only if |
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
.
# 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')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.