Learn R Programming

tikatuwq (version 0.8.2)

conama_check: CONAMA conformity check (detailed; default class = "2")

Description

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")

Value

The input df with additional columns per parameter as described.

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").

See Also

conama_limits(), conama_summary(), conama_report(), conama_text()

Examples

Run this code
if (FALSE) {
data("wq_demo", package = "tikatuwq")
head(conama_check(wq_demo, classe = "2"))
}

Run the code above in your browser using DataLab