Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

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 with this program, so sorry if I make some confusion.
> fattyac_msc<-data.frame(C16_0=I(C16_0),C16_1=I(C16_1),C18_0=I(C18_0),
+ C18_1=I(C18_1),C18_2=I(C18_2),C18_3=I(C18_3),NITmsc=I(fat_msc))
> names(fattyac_msc)
[1] “C16_0” “C16_1” “C18_0” “C18_1” “C18_2” “C18_3” “NITmsc”
Let´s plot the X (spectra) matrix treated with MSC and centered (Fig 1)
> fattyac_msc_c<-scale(fattyac_msc$NITmsc,center = TRUE,scale = FALSE) > matplot(wavelengths,t(fattyac_msc_c),lty=1,pch=21, + xlab=”data_points”,ylab=”Abs”) Let´s plot the X (spectra) Standard Deviation Spectrum of this centered matrix (Fig 2) > sdfattyac_msc_c<-sd(fattyac_msc_c) > matplot(wavelengths,sdfattyac_msc_c,lty=1,pch=21, + xlab=”data_points”,ylab=”Abs”) Let´s have a look again to the original spectra treated with MSC: It is clear the sample which has a high MD (Mahalanobis Distance) value, a clear outlier. We will see, which characteristics has this sample (along this study) and if it should be excluded or maintained for the calibration We saw the scores in the previous post, let´s have a look to the loadings. > fatmsc_nipalsP4pc<-fatmsc_nipals$P[,1:4]