Description Usage Arguments Value Examples
View source: R/summary_functions.R
Find the MEC (no projection) from the observed dataset using methods described in EPA's Technical Support Document for Water Quality-based Toxics Control.
1 |
qual |
A character vector containing non-detect indicator strings, e.g., "<" or "ND". The strings used to indicate censored status can be edited in the "nd" argument. |
result |
A numeric vector of concentration measurements. |
nd |
A list indicating all the censoring flags included in the dataset. Defaults to "<", "nd", and "ND". |
simple_output |
Logical value. If TRUE, the output columns are concatenated into a single character string (e.g., "<0.2") which can be useful for constructing summary tables. |
Dataframe with a qualifier column (character) and a MEC column (numeric).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Find observed MEC
cen_result <- c(rep("", 10), rep("<", 10))
result <- 1:20
find_mec(cen_result, result)
cen_result <- rep("<", 20)
find_mec(cen_result, result)
cen_result <- rep("", 20)
find_mec(cen_result, result)
# Demonstrate simplified output
find_mec(cen_result, result, simple_output = TRUE)
# Define a set of custom non-detect flags
cen_result <- c(rep("non-detect", 5), rep("<", 10), rep("mdl", 5))
find_mec(cen_result, result, nd = c("non-detect", "<", "mdl"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.