fit_float: Central fitting function with float environment

Description Usage Arguments Examples

Description

This function allows to process all samples, especially written for the float environment.

Usage

1
2
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
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))

LCF documentation built on May 2, 2019, 6:08 a.m.

Related to fit_float in LCF...