View source: R/CoDA_Univariate.R
CoDA_Univariate | R Documentation |
Calculates univariate statistics for the parts of a given composition, using Compositional Data Analysis (CoDA) principles.
CoDA_Univariate(data, ppm_vars = NULL)
data |
A dataframe of observations for a given composition. Entries must be non-zero and positive. |
ppm_vars |
A character vector with the names of the parts of the data that are in parts-per-million (ppm). |
A tibble with univariate statistics (mean, median, sd-ilr, mad-ilr) for the given composition, in their original scale (percent and/or ppm). For a more detailed explanation check the reference.
Filzmoser, P., Hron, K. & Reimann, C. (2009). Univariate statistical analysis of environmental (compositional) data: Problems and possibilities. Science of The Total Environment, 407(23), 6100-6108. 10.1016/j.scitotenv.2009.08.008.
data("Aar", package = 'compositions') d1 = Aar %>% dplyr::select(SiO2,Al2O3,MnO) d2 = Aar %>% dplyr::select(SiO2,Al2O3,Ba,Pb) CoDA_Univariate(d1) # with no variables in ppm CoDA_Univariate(d2, ppm_vars = c('Ba','Pb')) # with Ba and Pb variables in ppm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.