Learn R Programming

ChemoSpec (version 1.60-9)

sPlotSpectra: s-Plot of Spectra Data Post PCA

Description

sPlotSpectra produces a scatter plot of the correlation of the variables against their covariance for a chosen principal component. It allows visual identification of variables driving the separation and thus is a useful adjunct to traditional loading plots.

Usage

sPlotSpectra(spectra, pca, pc = 1, tol = 0.05,
	title = "no title provided", ...)

Arguments

Value

A data frame containing the covariance and correlation of the selected pc for the Spectra object. A plot of the correlation vs. covariance is created.

References

Wiklund, Johansson, Sjostrom, Mellerowicz, Edlund, Shockcor, Gottfries, Moritz, and Trygg. "Visualization of GC/TOF-MS-Based Metablolomics Data for Identification of Biochemically Interesting Compounds Usings OPLS Class Models" Analytical Chemistry Vol.80 no.1 (2008): 115-122.

Examples

Run this code
data(CuticleIR)
IR.pca <- classPCA(CuticleIR)
splot <- sPlotSpectra(spectra = CuticleIR, pca = IR.pca, pc = 1, tol = 0.005,
title = "Serenoa repens IR")

Run the code above in your browser using DataLab