plot_LCF: Plot sample data, linear combination fit and residual...

Description Usage Arguments Examples

Description

This function allows plotting (png or tiff image files) of the corrected sample spectrum, the linear combination fit and the residual.

Usage

1
2
3
plot_LCF(all.samples, all.standards, LCF.res, LC.vals, corr.norm,
  float = NULL, exclude = NULL, use.tiff = NULL, E.zero = NULL,
  set.plot.ymax = NULL, file.output = NULL)

Arguments

all.samples

List of all samples

all.standards

List of all standards

LCF.res

Results from function fit_float()

LC.vals

The fitting range values for the linear combination fitting

corr.norm

Vector of the base-line correction and edge-step normalization values (vector of length 4)

float

Logical, default to FALSE

exclude

Logical, default to FALSE

use.tiff

Logical, default to FALSE

E.zero

Set E0, defaults to NULL

set.plot.ymax

Set maximum of plot y axis, defaults to NULL

file.output

Logical, default to FALSE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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))
param.float <- expand.grid(pre.adj.1 = seq(-45,-30,5), 
  pre.adj.2 = seq(-19,-9,5), post.adj.1 = seq(34,40,2), 
  post.adj.2 = seq(50,65,5))
float.fit <- fit_float(all.samples = corr.spec.samples[1], 
  all.standards = corr.spec.standards, LC.vals = c(-14, 46), 
  float = param.float, ex.smaller = 0.05)
par(pty="s")
plot_LCF(all.samples = corr.spec.samples[1], 
  all.standards = corr.spec.standards, 
  LCF.res = float.fit[1,], LC.vals = c(-14,46), 
  corr.norm = c(-36, -15, 37, 58))

Example output

Overall progress:

Fitting sample: Mi01, with 192 combinations, starting: 2019-11-25 20:58:47
Sample finished: 2019-11-25 20:58:48

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

Related to plot_LCF in LCF...