View source: R/piper_data_prep.R
piper_data_prep | R Documentation |
It transforms hydrochemical data (cations and anions) so they can be plotted on piper_diagram()
.
piper_data_prep(data)
data |
A dataframe with cations and anions, with the following names: Ca, Mg, Na, K, Cl, SO4, CO3, HCO3 |
A dataframe with x
and y
coordinates and the rest of the original data
d = data.frame(Group = c('A','A','B','B'), Ca = c(120,150,110,52.6), Mg = c(78,160,110,28), Na = c(210,590,340,51.6), K = c(4.2,2,3.6,2.3), HCO3 = c(181,181,189,151), CO3 = 0, Cl = c(220,744,476,72.2), SO4 = c(560,1020,584,126)) piper_data_prep(d)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.