A class that describes a baseline correction algorithm. The idea is that it contains all information needed to use an algorithm with the optimisation framework and the graphical user interface (but see Notes below).
Objects can be created by calls of the form new("baselineAlg", ...)
.
name
:Short-name of the algorithm. This must match
the name of the object in the baselineAlgorithms
list of
algorithms, and is used throughout the code to identify the
algorithm. It should thus start with a letter and contain only
letters, digits, underscores ("_") or dots (".").
description
:Description of the algorithm, typically the full name. This will be used in the code to describe the algorith, so it should not be too long, and not contain newline characters.
funcName
:The name of the function used to estimate
the baseline. The function must take an argument
spectra
, and return a list with the estimated baselines
(baseline
) original spectra (spectra
) and the
corrected spectra (corrected
). It can also take other
arguments (typically parameters) and return additional components
in the list.
param
:A data frame with information about the
parameters of the algorithm. It should contain the following
coloumns: name
- the name of the parameter; integer
- TRUE
if the parameter only takes integer values,
otherwise FALSE
; min
- the lower limit of allowed values;
incl.min
- TRUE
if the lower limit is an allowed
value, otherwise FALSE
; default
- the default value;
max
- the upper limit of allowed values; incl.max
-
TRUE
if the upper limit is an allowed value, otherwise FALSE
signature(object = "baselineAlg")
: Extract
the description
slot
signature(object = "baselineAlg")
: Extract
the funcName
slot
signature(object = "baselineAlg")
: Extract
the name
slot
signature(object = "baselineAlg")
: Extract
the param
slot
Bjørn-Helge Mevik and Kristian Hovde Liland