map.spectra.gradient {windows.pls}R Documentation

Colors and plots each spectra based on the associated concentration of the outcome variable

Description

Colors and plots each spectra based on the associated concentration of the outcome variable

Usage

map.spectra.gradient(
  xblock = NULL,
  yblock = NULL,
  legend.title = "Gradient",
  plot.title = "Spectra with gradient based on Y variable",
  xlab = "Wavelength",
  ylab = "Absorbance",
  grad = 10,
  l.width = 0.75,
  col.legend = NULL
)

Arguments

xblock

A matrix containing one spectra for each observation.

yblock

A vector containing the concentration associated to each spectra in the xblock matrix.

legend.title

Title of the legend which displays the gradient.

plot.title

Title of the plot.

xlab

Title of the x axis.

ylab

Title of the y axis.

grad

Number of colors for the gradient's palette.

l.width

Width of each spectra.

col.legend

Deletes presence of the legend.

Value

Plot with spectra of all observations, mapped with the intensity of the associated concentration.

Examples

data(beer)
X=beer[,2:ncol(beer)]
names(X)=convert.names.wl(1100,2250,2)
Y=unlist(beer[,1])
map.spectra.gradient(X,Y)

[Package windows.pls version 0.1.0 Index]