assess_single <- function(x, direction_col, value_col, wqs_col) {
x %>%
dplyr::filter(wqs.time == "single") %>%
dplyr::mutate(violation = dplyr::case_when(
{{direction_col}} %in% "greater" ~ as.character({{value_col}} > {{wqs_col}}),
{{direction_col}} %in% "less" ~ as.character({{value_col}} <= {{wqs_col}}),
TRUE ~ "ERROR"
)) %>%
dplyr::select(violation, dplyr::everything())
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.