mrg_cen_cols {reasonabletools} | R Documentation |
Merge together observed concentrations and detection limits
Description
Merge a results column with a detection limits column by overwriting the censored results values with the corresponding detection limit.
Usage
mrg_cen_cols(qual, result, limit, nd = c("<", "nd", "ND"))
Arguments
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. |
limit |
A numeric vecotr of method detection limit/reporting limit values. |
nd |
A list indicating all the censoring flags included in the dataset. Defaults to "<", "nd", and "ND". |
Value
A numeric vector.
Examples
result <- runif(5, 1, 10)
cen_result <- sample(c("<", ""), length(result), replace = TRUE)
method_limit <- rep(0.1, length(result))
result <- mrg_cen_cols(cen_result, result, method_limit)
print(data.frame(cen_result, result, stringsAsFactors = FALSE))
[Package reasonabletools version 0.1 Index]