Learn R Programming

tofsims (version 1.0.2)

MCR-class: Class MCR

Description

Class MCR contains methods for 'Multivariate Curve Resolution by Alternate Least Squares'

opaMCR is a MCR-ALS function using the Orthogonal Projection Approach from

Usage

opaMCR(dataObject, opaComps, maxiter = 10)

Arguments

dataObject
object of class MassImage
opaComps
numeric number of components for the opa method
maxiter
numeric how many iterations

Value

  • object of class MCR

Details

Class MCR contains methods for 'Multivariate Curve Resolution by Alternate Least Squares'

opaMCR uses the function ChemometricsWithR::opa() (Orthogonal Projection Approach, CRAN package 'ChemometricsWithR') for start estimates of pure spectras and ALS::als() (CRAN package 'ALS') as MCR-ALS implementation. This method is doing fine with images up to 256x256 pixels. For larger images, memory usage becomes unreasonably high.

Examples

Run this code
testImage<-MassImage('dummy')
testImage<-opaMCR(testImage, 2, 2)
image(analysis(testImage,1), comp = 1)
library(tofsimsData)
data(tofsimsData)
testImage<-MCR(testImage, 5, 5)
image(analysis(testImage,1), comp = 1)

Run the code above in your browser using DataLab