Learn R Programming

baseline (version 1.3-5)

baselineAlg-class: Class "baselineAlg"

Description

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).

Arguments

Objects from the Class

Objects can be created by calls of the form new("baselineAlg", ...).

Slots

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

Methods

description

signature(object = "baselineAlg"): Extract the description slot

funcName

signature(object = "baselineAlg"): Extract the funcName slot

name

signature(object = "baselineAlg"): Extract the name slot

param

signature(object = "baselineAlg"): Extract the param slot

Author

Bjørn-Helge Mevik and Kristian Hovde Liland

Examples

Run this code
showClass("baselineAlg")

Run the code above in your browser using DataLab