piper_data_prep: Piper Data Preparation

View source: R/piper_data_prep.R

piper_data_prepR Documentation

Piper Data Preparation

Description

It transforms hydrochemical data (cations and anions) so they can be plotted on piper_diagram().

Usage

piper_data_prep(data)

Arguments

data

A dataframe with cations and anions, with the following names: Ca, Mg, Na, K, Cl, SO4, CO3, HCO3

Value

A dataframe with x and y coordinates and the rest of the original data

Examples


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)


maxgav13/GMisc documentation built on June 12, 2022, 3:48 a.m.