segment.windows {windows.pls}R Documentation

Displays how spectra are divided in windows

Description

Displays how spectra are divided in windows

Usage

segment.windows(
  xblock = NULL,
  yblock = NULL,
  windows = 3,
  fade = 0.3,
  xlab = "Wavelength",
  ylab = "Absorbance",
  title = paste("Spectra divided in", windows, "segments", sep = " "),
  legend = NULL,
  grad = 10
)

Arguments

xblock

A matrix containing one spectra for each observation.

yblock

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

windows

Number of windows the spectra has to be divided in.

fade

Opacity of the window.

xlab

Title of the x axis.

ylab

Title of the y axis.

title

Title of the plot.

legend

Name of the substance which drives the gradient of spectra’s mapping.

grad

Number of colors that are used to build the gradient.

Value

Plot of spectra in which segments have a different background color.

Examples

data(beer)
conc=unlist(beer[,1])
sp=beer[,2:ncol(beer)]
names(sp)=convert.names.wl(1100,2250,2)
segment.windows(sp,conc,windows=7,fade=0.25)

[Package windows.pls version 0.1.0 Index]