spectralAnalysis4.3.3 package

Pre-Process, Visualize and Analyse Spectral Data

addMessage

add an message to list of messages for printing #

addPreprocessingStep

function to use by preprocessing step

baselineCorrect

generic function to perfom baseline correction

changeDevSettings

Function to overwrite default settings

checkCompatible

Check object compatibility

checkForRedundantSources

Check for redunt NMF source vectors

checkIdenticalClass

check wether all elements of of the same class

checkMethod

check method in list of allowd method

checkTimeUnit

check timeeUnit and produce error if not correct unit

combineSpectralObjects

Function to combine SpectraInTime-class objects containing 1 spectru...

completeSourceMatrix

complete source matrix

computeNMFResidu

NMF relative residual per observation

convertListToS4

convert an a named list to S4 object

convertS4ToList

convert an S4 object into a list

e

Create an ElementsToSelect-class from a numeric vector or multiple n...

ElementsToSelect-class

Elements S4 class useful for closest elements subsetting

first

return first element (of a vector)

firstSpectrum

Get the first spectrum

flagVectorInInterval

flag vector elements within interval (closed interval )

getClosestElements

get closest element for elements looked up in a vector

getDefaultSumFunc

function to get default summary functions

getDefaultTimeFormat

function to get default time format in the package

getDimensionReduction

generic function to extract dimensionReduction-slot

getElements

generic function to extract elements-slot

getExperimentName

generic function to extract experimentName-slot

getExtraInfo

generic function to extract extraInfo-slot

getListOfSpectraExample

get example list of spectra

getNMFInputMatrix

Get spectralData as input NMF model

getPathProcessTimesExample

example path process times

getPreprocessing

generic function to extract preprocessing-slot

getProcessTimesExample

get a minimal ProcessTimes-class example based on `getSpectraInTimeE...

getProcessTimesFrameExample

get mimimal example ProcessTimesFrame-class

getRange

generic function to extract range-slot

getSpectra

generic function to extract spectra-slot

getSpectraInTimeCompExample

Artificial example of SpectraInTimeComp-class

getSpectraInTimeExample

Artificial example SpectraInTime-class

getSpectralAxis

generic function to extract spectralAxis-slot

getStartTime

generic function to extract startTime-slot

getTimeConversionFactor

transform timeUnit to convert from seconds to specified unit

getTimePoints

generic function to extract timePoints-slot

getUnits

generic function to extract units-slot

includeRedundantSources

Re-introduce redundant sources in NMF-model

initializeNMFModel

Initialize NMF model with initial spectral data

last

return laste element( of a vector )

lastSpectrum

Get the last spectrum

loadAllSPCFiles

Load all or a selection of SPC files from a given directory.

localBaselineCorrect

Local baseline correction

multiplicativeScatterCorrect

multiplicative scatter correction on 1 function

nonNegativePreprocessing

condition datamatrix to input in and condition properly for NMF

normalize

generic normalization function

plotlyAxis

help function to make plotly axis title

predictNNLS

Based on previously obtained NMF result NMFResult, estimate coeffici...

preprocess

generic function to preprocess an S4 object

preprocessSpectraInTimeWithList

internal function to wrap multiple preprocessing steps

ProcessTimes-class

S4 Class key process times

ProcessTimesFrame-class

ProcessTimes-class

r

create a RangeToSubset-class object from 2 elements or from a vector

RangeToSubset-class

RangeToSubset-class

readProcessTimes

read .csv file as process times

readSPC

Read-in of a SPC file.

removeRedundantSources

Remove redundant sources from the initial NMF model

runNMF

Actual NMF analysis

saveSpectra

read or save a SpectraInTime-class from or to a .txt file

scaleNMFResult

Apply fixed scaling to NMF model

scatterCorrect

perform multiplicative scatter correction

scatterCorrectSpectra

perform multiplicative scatter correction on spectralData

setExperimentName

set the experiment name

setTimePointsAlt

set time alternative time axis

smooth

generic smoothing function

SpectraInTime-class

SpectraInTime-class

SpectraInTimeComp-class

SpectraInTimeComp-class (time resolved spectra )

spectralIntegration

Integrate spectraInTime object

spectralNMF

Perform Non-Negative Matrix factorization on spectral data

spectralNMFList

Perform Non-Negative Matrix factorization on list of SPC files

spectralNormalization

normalization function

spectralPLSCalibration

Compute PLS model

spectralPlsPrediction

Perform PLS prediction

spectralSmoothAndDifferentiate

internal smoothing and differentiation function

subset-methods

Subsetting SpectraInTime-class

subset.SpectraTime

internal function for subsetting

SummaryByWavelengths-class

S4-class for summary object SpectraInTime

testListOfSpectra

internal function to check all elements are spectraInTime

timeAlign.listOfSpectra

Align all spectra in a list

timeAlign

Time align first object, using info in the second object

timeAlign.SpectraInTime

align 1 SpectraInTime with 1 cooling information

trapz

Integration via trapezium rule

upsampleNMFResult

Upsample NMF result to original temporal resolution

wavelengthAlign

Wavelength align spectral data

Infrared, near-infrared and Raman spectroscopic data measured during chemical reactions, provide structural fingerprints by which molecules can be identified and quantified. The application of these spectroscopic techniques as inline process analytical tools (PAT), provides the pharmaceutical and chemical industry with novel tools, allowing to monitor their chemical processes, resulting in a better process understanding through insight in reaction rates, mechanistics, stability, etc. Data can be read into R via the generic spc-format, which is generally supported by spectrometer vendor software. Versatile pre-processing functions are available to perform baseline correction by linking to the 'baseline' package; noise reduction via the 'signal' package; as well as time alignment, normalization, differentiation, integration and interpolation. Implementation based on the S4 object system allows storing a pre-processing pipeline as part of a spectral data object, and easily transferring it to other datasets. Interactive plotting tools are provided based on the 'plotly' package. Non-negative matrix factorization (NMF) has been implemented to perform multivariate analyses on individual spectral datasets or on multiple datasets at once. NMF provides a parts-based representation of the spectral data in terms of spectral signatures of the chemical compounds and their relative proportions. See 'hNMF'-package for references on available methods. The functionality to read in spc-files was adapted from the 'hyperSpec' package.