#' Threshold determination for WQS/GV with dynamic thresholds dependent
#' on one or more independent parmeters
#'
#' @param .data a data frame
#' @return A data frame
#' @export
thresh_determination <- function(.data) {
split.df <- split(.data, .data$wqs_threshold)
split.df$thresh_total_ammonia$threshold <- mapply(
FUN = thresh_total_ammonia,
.ph = split.df$thresh_total_ammonia$value_ph,
.temp = split.df$thresh_total_ammonia$value_temperature,
.trout_water = grepl("(t)|(ts)", split.df$thresh_total_ammonia$class),
.type = split.df$thresh_total_ammonia$type
)
split.df$thresh_hardness_correction$threshold <- mapply(
FUN = thresh_hardness_correction,
.param = split.df$thresh_hardness_correction$parameter,
.hardness = split.df$thresh_hardness_correction$value_hardness,
.type = split.df$thresh_hardness_correction$type
)
final.df <- do.call(rbind, split.df)
return(final.df)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.