meq: Calculate MEQ values

View source: R/utils.R

meqR Documentation

Calculate MEQ values

Description

Calculates MEQ values for 'long' data in mg/L. Expects columns: "aqua_code" and "RESULT", where "aqua_code" is the parameter type (e.g., "Zn_diss") and RESULT is the numeric concentration in mg/L.

Usage

meq(d, drop_na = FALSE)

Arguments

d

Data frame. Long data containing parameters and results

drop_na

Logical. Whether to omit missing parameters

Details

For conversion details see the included data frame, meq_conversion.

Also see ?meq_conversion for a description of the data.

MEQs are calculated by dividing the parameter concentration in mg/L by the conversion factor.

Note: This is an internal function, exported for clarity in calculations

Examples


d <- data.frame(aqua_code = c("Cl", "HCO3"), RESULT = c(5.7, 38.3))
d
meq(d, drop_na = TRUE)
meq(d)



steffilazerte/rems2aquachem documentation built on Feb. 24, 2024, 2:36 a.m.