With the identify function we can check which wavelengths have more weights in the loadings.
Here I plot the first four loadings after calculating the PCs, using the "gasoline" data from the package "ChemometricsWithR".
This is the code to identify the weights in the case of the first one:
matplot(wavelengths,gas.loadings[,1],type="l",lty=1,col="red",
+xlab="wavelength",ylab="log 1/R",
+main="loading nº1")
identify(wavelengths,gas.loadings[,1],
+labels=row.names(gas.loadings))
No hay comentarios:
Publicar un comentario