data(milk)
Raman <- milk$Raman[, 850:3300]
EMSC.basic <- EMSC(Raman)
EMSC.poly6 <- EMSC(Raman, degree = 6)
EMSC.ref <- EMSC(Raman, degree = 6, reference = Raman[30, ])
old.par <- par(mfrow = c(2,2), mar = c(4,4,1,1))
xlim <- rev(as.numeric(range(colnames(Raman))))
matplot(colnames(Raman), t(Raman), type = 'l', xlim = xlim,
ylab = 'Relative intensity', xlab = 'Raw spectra')
matplot(colnames(Raman), t(EMSC.basic$corrected), type = 'l', xlim = xlim,
ylab = 'Relative intensity', xlab = 'Corrected (basic)')
matplot(colnames(Raman), t(EMSC.poly6$corrected), type = 'l', xlim = xlim,
ylab = 'Relative intensity', xlab = 'Corrected (6th degree polynomial)')
matplot(colnames(Raman), t(EMSC.ref$corrected), type = 'l', xlim = xlim,
ylab = 'Relative intensity', xlab = 'Corrected (reference = spec. #30)')
par(old.par)Run the code above in your browser using DataLab