Publications by jrcuesta
NIT: Fatty acids study in R – Part 007
Once we have chosen the model, we can continue acquiring spectra of new samples. Spectra is exported to a txt or csv file and we imported in R to be reprocessed.We use the function “predict” from the PLS package. I have done this with 20 new samples. We need first to apply to them the adequate math treatment (same as the used in the model). I...
3194 sym 4 img
Savitzky-Golay filters in R
Derivatives are a good way to extract information to our spectra. As we know NIR contents overlapping bands, and spectra must be treated with math operations in order to extract as much information as possible and to correlate it with the constituent of interest in the case of quantitative analysis or to discriminate two similar products.Deriva...
1599 sym 6 img 1 tbl
Applying Savitzky-Golay filters in “R”
When applying SG, we select a moving average window with an odd value “n” for the number of data points. SG fit a polynomial of “p” degree to this data points and give the value to the central point (this is the reason to have an odd value). We apply also an smooth in the case of “m” = 0, or the first (m=1), second (m=2) or third (m=3...
1371 sym 4 img 1 tbl
VIDEO:Looking to "NIR" Spectra in "R": (Import and organize)
Related To leave a comment for the author, please follow the link and comment on their blog: NIR-Quimiometría. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click here ...
400 sym 2 img
VIDEO: Applying "MSC" math-treatment to our raw spectra in "R".
Related To leave a comment for the author, please follow the link and comment on their blog: NIR-Quimiometría. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click here ...
399 sym 2 img
VIDEO: Applying "SNV" math-treatment to our raw spectra in "R".
Related To leave a comment for the author, please follow the link and comment on their blog: NIR-Quimiometría. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click here ...
399 sym 2 img
SCRIPT for NIR "DEMO" Tutorial – 001
########### RAW NIR Demo Data##################################demoVISVISNIRNIRALLALLProteinFatAshDMMoisturedemo_raw+ Moisture=I(Moisture),VIS=I(VIS),NIR=I(NIR),ALL=I(ALL))wave_viswave_nirwave_allmatplot(wave_vis,t(demo_raw$VIS),lty=1,pch=”.”,xlab=”nm”,ylab=”log(1/R)”)matplot(wave_nir,t(demo_raw$NIR),lty=1,pch=”.”,xlab=”nm”,yl...
1697 sym 2 img
Dividing the Sample Set in two (Validation & Training)
We have in the Demo sample set “66” samples. In this post we´ll see one way to divide the set in two parts: one for “Validation” and another for Training or Calibration.The selection will be random. And we are going to use the command: “sample”. I decided to select 10 samples for validation, and the rest for training.demo_raw_valIf...
1308 sym 6 img
Comparing Spectra with different math treatments
It is amazing the quantity of graphics you can develop with R, and how you can show and manage these graphics. Here in the same plot we compare the raw demo spectra, treated with MSC, SNV and with the first derivative (differences between consecutive data points). We can see how SNV and MSC look similar, but if you look to the Y axis, they ...
1154 sym 4 img
VIDEO: "R" Checking the reference values ("Y" Matrix).
Related To leave a comment for the author, please follow the link and comment on their blog: NIR-Quimiometría. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click here ...
399 sym 2 img