Package: spectralAnalysis 4.3.3

spectralAnalysis: Pre-Process, Visualize and Analyse 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.

Authors:Robin Van Oirbeek [aut], Adriaan Blommaert [aut, cre], Nicolas Sauwen [aut], Tor Maes [ctb], Jan Dijkmans [ctb], Jef Cuypers [ctb], Tatsiana Khamiakova [ctb], Michel Thiel [ctb], Claudia Beleites [ctb]

spectralAnalysis_4.3.3.tar.gz
spectralAnalysis_4.3.3.zip(r-4.5)spectralAnalysis_4.3.3.zip(r-4.4)spectralAnalysis_4.3.3.zip(r-4.3)
spectralAnalysis_4.3.3.tgz(r-4.4-any)spectralAnalysis_4.3.3.tgz(r-4.3-any)
spectralAnalysis_4.3.3.tar.gz(r-4.5-noble)spectralAnalysis_4.3.3.tar.gz(r-4.4-noble)
spectralAnalysis_4.3.3.tgz(r-4.4-emscripten)spectralAnalysis_4.3.3.tgz(r-4.3-emscripten)
spectralAnalysis.pdf |spectralAnalysis.html
spectralAnalysis/json (API)
NEWS

# Install 'spectralAnalysis' in R:
install.packages('spectralAnalysis', repos = c('https://ablommaert.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

On CRAN:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

2.26 score 18 scripts 225 downloads 59 exports 102 dependencies

Last updated 10 months agofrom:7eba3dcf40. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 27 2024
R-4.5-winOKOct 27 2024
R-4.5-linuxOKSep 27 2024
R-4.4-winOKOct 27 2024
R-4.4-macOKOct 27 2024
R-4.3-winOKOct 27 2024
R-4.3-macOKOct 27 2024

Exports:as.data.framebaselineCorrectcheckCompatiblecheckIdenticalClasscombineSpectralObjectscomputeNMFResiduefirstSpectrumgetDefaultSumFuncgetDefaultTimeFormatgetDimensionReductiongetElementsgetExperimentNamegetExtraInfogetListOfSpectraExamplegetNMFInputMatrixgetPathProcessTimesExamplegetPreprocessinggetProcessTimesExamplegetProcessTimesFrameExamplegetRangegetSpectragetSpectraInTimeCompExamplegetSpectraInTimeExamplegetSpectralAxisgetStartTimegetTimePointsgetUnitsinitializeNMFModellastSpectrumloadAllSPCFileslocalBaselineCorrectnonNegativePreprocessingnormalizeplotpredictNNLSpreprocessProcessTimesrreadProcessTimesreadSPCreadSpectrarunNMFsaveSpectrascaleNMFResultscatterCorrectsetExperimentName<-setTimePointsAlt<-smoothSpectraInTimeSpectraInTimeCompspectralIntegrationspectralNMFspectralNMFListspectralPLSCalibrationspectralPlsPredictionsummarytimeAlignwavelengthAlign

Dependencies:abindaskpassbase64encbaselineBiobaseBiocGenericsBiocManagerbitopsbslibcachemcliclustercodetoolscolorspacecpp11crosstalkcurldata.tabledigestdoParalleldplyrevaluatefansifarverfastmapfontawesomeforeachfsgenericsggplot2gluegridBasegridExtragtablehighrhNMFhtmltoolshtmlwidgetshttrisobanditeratorsjquerylibjsonliteknitrlabelinglaterlatticelazyevallifecyclelimSolvelpSolvemagrittrMASSMatrixmemoisemgcvmimemunsellnlmeNMFnnlsopenssloro.niftipillarpkgconfigplotlyplotrixplsplyrpromisespurrrquadprogR6rappdirsrasterImageRColorBrewerRcppregistryreshape2rlangrmarkdownrngtoolsRNiftisassscalessignalSparseMstringistringrsystibbletidyrtidyselecttinytexutf8vctrsviridisviridisLitewithrxfunyamlzoo

Spectral Analysis

Rendered fromspectralAnalysis.Rmdusingknitr::rmarkdownon Oct 27 2024.

Last update: 2023-01-11
Started: 2023-01-11

Readme and manuals

Help Manual

Help pageTopics
generic function to perfom baseline correctionbaselineCorrect baselineCorrect,SpectraInTime-method baselineCorrect,SpectraInTimeComp-method
Check object compatibilitycheckCompatible checkCompatible,ProcessTimes,SpectraInTime-method checkCompatible,SpectraInTime,ProcessTimes-method [ProcessTimes,SpectraInTime-method [SpectraInTime,ProcessTimes-method
Check for redunt NMF source vectorscheckForRedundantSources
check wether all elements of of the same classcheckIdenticalClass
Function to combine 'SpectraInTime-class' objects containing 1 spectrum eachcombineSpectralObjects
NMF relative residual per observationcomputeNMFResidu
Create an 'ElementsToSelect-class' from a numeric vector or multiple numeric values or vectorse
Elements S4 class useful for closest elements subsettingElementsToSelect-class
Get the first spectrumfirstSpectrum firstSpectrum,numeric-method firstSpectrum,SpectraInTime-method
function to get default summary functionsgetDefaultSumFunc
function to get default time format in the packagegetDefaultTimeFormat
generic function to extract 'dimensionReduction'-slotgetDimensionReduction
generic function to extract 'elements'-slotgetElements getElements,ElementsToSelect-method
generic function to extract 'experimentName'-slotgetExperimentName getExperimentName,SpectraInTime-method
generic function to extract 'extraInfo'-slotgetExtraInfo getExtraInfo,SpectraInTime-method
get example list of spectragetListOfSpectraExample
Get spectralData as input NMF modelgetNMFInputMatrix
example path process timesgetPathProcessTimesExample
generic function to extract 'preprocessing'-slotgetPreprocessing getPreprocessing,SpectraInTime-method
get a minimal 'ProcessTimes-class' example based on 'getSpectraInTimeExample'getProcessTimesExample
get mimimal example 'ProcessTimesFrame-class'getProcessTimesFrameExample
generic function to extract 'range'-slotgetRange getRange,RangeToSubset-method
generic function to extract 'spectra'-slotgetSpectra getSpectra,SpectraInTime-method
Artificial example of 'SpectraInTimeComp-class'getSpectraInTimeCompExample
Artificial example 'SpectraInTime-class'getSpectraInTimeExample
generic function to extract 'spectralAxis'-slotgetSpectralAxis getSpectralAxis,SpectraInTime-method
generic function to extract 'startTime'-slotgetStartTime getStartTime,SpectraInTime-method
generic function to extract 'timePoints'-slotgetTimePoints getTimePoints,SpectraInTime-method
generic function to extract 'units'-slotgetUnits getUnits,SpectraInTime-method
Re-introduce redundant sources in NMF-modelincludeRedundantSources
Initialize NMF model with initial spectral datainitializeNMFModel
Get the last spectrumlastSpectrum lastSpectrum,numeric-method lastSpectrum,SpectraInTime-method
Load all or a selection of SPC files from a given directory.loadAllSPCFiles
Local baseline correctionlocalBaselineCorrect
condition datamatrix to input in and condition properly for NMFnonNegativePreprocessing
generic normalization functionnormalize normalize,SpectraInTime-method normalize,SpectraInTimeComp-method
Based on previously obtained NMF result 'NMFResult', estimate coefficients for a new spectralData object 'object' using non-negative least squares fitting. The result is returned as as an NMF model.predictNNLS
generic function to preprocess an S4 objectpreprocess preprocess,SpectraInTime,list-method preprocess,SpectraInTime,SpectraInTime-method preprocess,SpectraInTimeComp,ANY-method
S4 Class key process timesProcessTimes ProcessTimes-class TemperatureInfo temperatureInfo temperatureinfo
ProcessTimes-classProcessTimesFrame-class
create a 'RangeToSubset-class' object from 2 elements or from a vectorr r,numeric,numeric-method r,RangeToSubset,missing-method
RangeToSubset-classRangeToSubset Rangetosubset rangetosubset RangeToSubset-class
read .csv file as process timesreadProcessTimes
Read-in of a SPC file.readSPC
Remove redundant sources from the initial NMF modelremoveRedundantSources
Actual NMF analysisrunNMF
read or save a 'SpectraInTime-class' from or to a '.txt' fileread readSpectra save saveSpectra
Apply fixed scaling to NMF modelscaleNMFResult
set the experiment namesetExperimentName<- setExperimentName<-,SpectraInTime-method setTimePointsAlt<-,SpectraInTime-method
set time alternative time axissetTimePointsAlt<-
generic smoothing functionsmooth smooth,SpectraInTime-method smooth,SpectraInTimeComp-method
SpectraInTimeComp-class (time resolved spectra )getDimensionReduction,SpectraInTimeComp-method SpectraInTimeComp spectraInTimeComp spectraintimecomp SpectraInTimeComp-class
Integrate spectraInTime objectspectralIntegration
Perform Non-Negative Matrix factorization on spectral dataspectralNMF
Perform Non-Negative Matrix factorization on list of SPC filesspectralNMFList
Compute PLS modelspectralPLSCalibration
Perform PLS predictionspectralPlsPrediction
Subsetting 'SpectraInTime-class'subset-methods [,SpectraInTime,ANY,ANY,ANY-method [,SpectraInTime,ANY,ANY-method [,SpectraInTime,ANY,missing-method [,SpectraInTime,missing,ANY-method [,SpectraInTime,missing,missing-method [,SpectraInTime-method [,SpectraInTimeComp,ANY,ANY-method [,SpectraInTimeComp,ANY,missing-method [,SpectraInTimeComp,missing,ANY-method
Time align first object, using info in the second objecttimeAlign timeAlign,list,character-method timeAlign,list,ProcessTimesFrame-method timeAlign,SpectraInTime,ProcessTimes-method
Upsample NMF result to original temporal resolutionupsampleNMFResult
Wavelength align spectral datawavelengthAlign wavelengthAlign,SpectraInTime,list-method wavelengthAlign,SpectraInTime,SpectraInTime-method