Skip to contents

For each parameter present in df, adds columns:

  • *_ok (logical),

  • *_status one of "ok", "acima_do_maximo", "abaixo_do_minimo",

  • *__lim_min and *__lim_max (thresholds used),

  • *__delta (difference to the relevant limit; >0 above max, <0 below min, 0 if ok).

If multiple limit rows exist for the same parameter, *_ok is TRUE if any row is satisfied; for status/lim_min/lim_max/delta, the first satisfied row is chosen; if none satisfy, the row with the smallest absolute violation (min |delta|) is used.

Usage

conama_check(df, classe = "2")

Arguments

df

A tibble/data.frame with parameter columns (e.g., ph, turbidez, od, dbo).

classe

Character class label (e.g., "especial", "1", "2", "3", "4").

Value

The input df with additional columns per parameter as described.

Examples

if (FALSE) { # \dontrun{
data("wq_demo", package = "tikatuwq")
head(conama_check(wq_demo, classe = "2"))
} # }