A basic example fitting a single element pair

library(WeatheringTrends)
data(welldata)
(fit1 <- FitElementRatio("Sr", "Zr", "depth.top", welldata))
plot(fit1)
coef(fit1)
coef(fit1, type="par")
coef(fit1, type="par.long")

Allows for enrichment of elements

Fake this by simply turning around mobile and immobile.

(fit2 <- FitElementRatio("Zr", "Sr", "depth.top", welldata))
plot(fit2)

Can fit multiple fits at once, turn off profiling of depth for this

fits <- FitElementRatios(c("Sr", "Pb", "CaO"), c("Zr", "V"), "depth.top", welldata, profile=FALSE, verbose=FALSE)
plot(fits)

Can also get coefficients here easily too

coef(fits)
coef(fits, type="par")
coef(fits, type="par.long")

Testing this out...

Can also change the fit so it's linear on the log(ratio) scale instead of on the ratio scale.

Original method, linear on the ratio scale.

(fita <- FitElementRatio("Sr", "Zr", "depth.top", welldata, profile=FALSE))
par(mfrow=c(1,2))
plot(fita)
plot(fita, log=FALSE)

Or linear on the log scale.

(fitb <- FitElementRatio("Sr", "Zr", "depth.top", welldata, loglinear=TRUE, profile=FALSE))
par(mfrow=c(1,2))
plot(fitb)
plot(fitb, log=FALSE)

Computing tau directly

tau1 <- FitTau("Sr", "Zr", "depth.top", welldata, cutoff=7.5)
plot(tau1)
taus <- FitTaus(c("Sr", "Pb"), c("Zr","V"), "depth.top", welldata, cutoff=c(7.5,12))
plot(taus)


AaronRendahl/WeatheringTrends documentation built on May 5, 2019, 11:42 a.m.