2 feb. 2012

"R": Plotting the spectra (Gasoline) - 002

"R" has a package called "ChemometricsWithR", where we can get data from different analytical instruments including Near Infrared (NIR).
Follow the steps to plot the spectra of a gasoline data set:
In this other case we plot the spectra of the NIR shootout 2002:
> data(shootout)
> wavelengths<-seq(600, 1898,by=2)
> mattplot(wavelengths,shootout$calibrate.1[1,],xlab="wavelength(nm)",ylab="log1/R)")

> library(ChemometricsWithR)
> data(gasoline, package="pls")
> wavelengths<-seq(900, 1700,by=2)
> matplot(wavelengths,t(gasoline$NIR),lty=1,xlab="wavelengths(nm)",ylab="log(1/R)")

No hay comentarios:

Publicar un comentario