View source: R/CTS_3_sources.R
| CTS_3_sources | R Documentation |
Solves determined systems for 2 tracers and 3 sources to assess solution dispersion and discriminant capacity.
CTS_3_sources(source, mixture, iter = 1000, seed = 123456, verbose = TRUE)
pairs(source, mixture, iter = 1000, seed = 123456, verbose = TRUE)
CTS_seeds_pairs(source, mixture, iter = 1000, seed = 123456, verbose = TRUE)
source |
Data frame of sediment sources containing 3 source rows, mean values, standard deviations, and sample size ('n'). |
mixture |
Data frame of mixture samples. |
iter |
Number of Monte Carlo iterations. Default is 1000. |
seed |
Integer seed for reproducibility. Default is 123456. |
verbose |
Logical. Whether to show a progress bar in the console. Default is TRUE. |
A data.frame ordered by max_dw (lowest dispersion first) containing:
id |
Pair of tracer names used for the system. |
w1, w2, w3 |
Calculated proportion contributions for Sources 1, 2, and 3. |
dw1, dw2, dw3 |
Dispersion uncertainties for Sources 1, 2, and 3 (half 84% - 16% quantile range). |
cons |
Proportion of Monte Carlo iterations yielding physically valid proportions between 0 and 1. |
max_dw |
Maximum dispersion uncertainty across all three sources. |
# Prepare small dummy datasets for 3 sources and 2 tracers
src <- data.frame(
ID = c("Src1", "Src2", "Src3"),
Tracer1 = c(10.5, 20.2, 5.0),
Tracer2 = c(2.1, 8.5, 12.3),
Tracer1_SD = c(1.1, 1.8, 0.5),
Tracer2_SD = c(0.3, 0.9, 1.1),
n = c(10, 10, 10)
)
mix <- data.frame(ID = "Mix1", Tracer1 = 12.0, Tracer2 = 6.0)
# Run engine
result <- CTS_3_sources(source = src, mixture = mix, iter = 100, verbose = FALSE)
head(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.