fit_float {LCF} | R Documentation |
Central fitting function with float environment
Description
This function allows to process all samples, especially written for the float environment.
Usage
fit_float(all.samples, all.standards, LC.vals, float, ex.smaller = NULL,
file.output = NULL, best.fits = NULL)
Arguments
all.samples |
List of all samples |
all.standards |
List of all standards |
LC.vals |
The fitting range values for the linear combination fitting |
float |
Let vary the energy range paramerters |
ex.smaller |
Exclude portions smaller than a given value (decimal form), default to NULL |
file.output |
Possibility to have a file output, default to NULL |
best.fits |
Possibility to output more than the best fit (e.g. the first 10 best fits), default to 1 |
Examples
data(stdmix)
corr.spec.standards <- initial_load(specdat[1:4],
corr.norm = c(-36, -15, 37, 58))
corr.spec.samples <- initial_load(specdat[5:8],
corr.norm = c(-36, -15, 37, 58))
## Select parameters for baseline correction and edge-step normalization
param.float <- expand.grid(pre.adj.1 = seq(-42,-30,6),
pre.adj.2 = seq(-19,-9,5), post.adj.1 = seq(35,40,5),
post.adj.2 = seq(50,65,5))
length(param.float[,1])
float.fit <- fit_float(all.samples = corr.spec.samples,
all.standards = corr.spec.standards,
LC.vals = c(-14, 46), float = param.float, best.fits = 20)
print(float.fit)
###### Using next configuration can be very time consuming
param.float.2 <- expand.grid(pre.adj.1 = seq(-43,-30,1),
pre.adj.2 = seq(-19,-9,.5), post.adj.1 = seq(34,40,.5),
post.adj.2 = seq(50,65,1))
[Package LCF version 1.7.0 Index]