waterclust | R Documentation |
This function allows the user to define clusters according to the hydrochemical characteristics of water samples and to build dendograms, using the Ward agglomeration method. Compositional Data (CoDA) approach and the Centered log ratio - clr transformation (Aitchison, 1982) are implemented for the data treatment.
waterclust(Data, height, typ, chem.name)
Data |
is dataframe that contains the hydrochemical composition of water samples. Titles must be as follows: ID, long, lat, source, Mg, Ca, Na, K, HCO3, Cl, SO4. All concentrations are in meq/l. Additional chemical compounds must be added in columns after the Fe column concentration and titles must be introduced in a vector in the chem.name variable. |
height |
is an integer that defines the height of the treecut to define clusters |
typ |
is a double between 0 and 1 which defines the analysis type. typ = 1 for the samples clustering and, typ = 2 for the chemical compounds clustering. |
chem.name |
is a vector than contains the titles of the additional chemical compoundS contained in the data set. If chem.name = FALSE, the following chemical compounds are assumed: Mg, Ca, Na, K, HCO3, Cl, SO4. |
Prints a matrix that contains the hydrochemical composition of water samples and the assigned cluster. A dendogram using the established height is plotted.
prints a matrix that contains the hydrochemical composition of water samples and the assigned cluster. A dendogram using the established height is plotted.
Adriana Piña appinaf@unal.edu.co
David Zamora dazamoraa@unal.edu.co
Aitchison, J. (1982). The Statistical Analysis of Compositional Data. Journal of the Royal Statistical Society. Series B (Methodological), 44(2), 139–177.
data(Balance) Dataclust <- waterclust(Balance, height = 50, typ = 2, chem.name = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.