Function to calculate the coordinates of anions and cations used in the Piper diagram.
anion_cation_transform(Ca, Mg, Na, K, HCO3, CO3, Cl, SO4, name = NULL)
| Ca | A numeric vector with the Ca concentration |
|---|---|
| Mg | A numeric vector with the Mg concentration |
| Na | A numeric vector with the Na concentration |
| K | A numeric vector with the K concentration |
| HCO3 | A numeric vector with the HCO3 concentration |
| CO3 | A numeric vector with the CO3 concentration |
| Cl | A numeric vector with the Cl concentration |
| SO4 | A numeric vector with the SO4 concentration |
| name | A numeric vector with the Ca concentration |
A list with the following entries:
cat_x,cat_y: numeric vectors with the x and y coordinates used to create the ternary diagram of the cations.
an_x, an_ynumeric vectors with the x and y coordinates used to create the ternary diagram of the anions.
d_x, d_y
meqL: A numeric vector with the meqL of the input concentrations.
sumanions: Sum of the meqL of the anions
anions: A matrix with the values of the normalized meqL of the anions.
cations: A matrix with the values of the normalized meqL of the anions.
Other piper functions: add_grid_lines_piper,
add_labels_piper,
ggplot_piper,
piper_classification,
piper_transform, plot_piper,
transform_piper_data