Here you will find daily news and tutorials about R, contributed by over 555 bloggers.
You can subscribe for e-mail updates:
And get updates to your Facebook:
If you are an R blogger yourself you are invited to add your own R content feed to this site (Non-English R bloggers should add themselves- here)

There are several algorithms to run a PLS regression (I recommend to consult the books: “Introduction to Multivariate Analysis in Chemometrics - Kurt Varmuza & Peter Filzmozer” and “Chemometrics with R – Ron Wehrens”).We are going to use ...

It is clear that MSC does not remove the entire scatter in the raw spectra, so some of the information is hidden by the scatter. Improvement of the sample presentation will help to remove the scatter.We know that the first loading is much related to th...

As I told you I´m a beginner in "R", so I realize that I have to prepare my data a little bit in order to continue from my previous post ( NIT: Fatty acids study in R - Part 002) after getting some errors. Anyway I´m really fascinated ...

> library(chemometrics)> fatmsc_nipals<-nipals(fat_msc,a=10,it=160)> CPs<-seq(1,10,by=1)> matplot(CPs,t(fatmsc_nipals$T),lty=1,pch=21, + xlab="PC_number",ylab="Explained_Var")In the 2D plot, we can see that with 3 or 4 principal...

This time I´m going to use my own data to develop a model to predict some fatty acid in the solid fat (pork).Samples had been analyzed in a NIT (Near Infrared Transmittance) instrument. The range of the wavelengths is from 850 to 1048 nm (100 data poi...

Outliers have an important influence over the PCs, for this reason they must be detected and examinee.We have just the spectra without lab data, and we have to check if any of the sample spectra is an outlier ( a noisy spectrum, a sample which belongs ...

We saw how to plot the raw spectra (X), how to calculate the mean spectrum, how to center the sprectra (subtracting the mean spectrum from every spectra of the original matrix X). After that we have developed the PCAs with the NIPALS algorithm, getting...

This plot in 2D, help us to decide the number of PCs, it is easy to create in R, once we have discompose the X matrix into a P matrix (loadings) and a T matrix (scores).For this plot, we just need the T matrix.> CPs<-seq(1,10,by=1)> matp...

> X<-yarn$NIR> X_nipals<-nipals(X,a=10,it=100)Two matrices are generated (P and T)As in other posts, we are going to look to the loadings & scores, for firsts three principal components:> wavelengths<-seq(1,268,by=1)> matplot(w...

The idea of this post is to compare the score plots for the first 3 principal components obtained with the algorithm “svd” with the scores plot of other chemometric software (Win ISI in this case). Previously I had exported the yarn spectra t...