global.r2 {windows.pls}R Documentation

Plots in a single window the R2 of each model.

Description

Plots in a single window the R2 of each model.

Usage

global.r2(
  wpls = NULL,
  col.cal = "blue",
  col.cv = "red",
  col.strip.background = "orange",
  xlab = NULL,
  ylab = NULL,
  title = NULL
)

Arguments

wpls

object obtained from cv.wpls.

col.cal

color for the calibration line.

col.cv

color for the cross-validation line.

col.strip.background

color of the banner for each window.

xlab

title of the x axis.

ylab

title of the y axis.

title

title of the plot.

Value

Plot of R2 of each spectra region used to compute PLS.

Examples

data(beer)
conc=beer[,1]
sp=beer[,2:ncol(beer)]
names(sp)=convert.names.wl(1100,2250,2)
conc=unlist(conc)
mywpls=cv.wpls(sp, conc,mode='wpls', windows = 5)
global.r2(mywpls,col.cal='navy',
               col.cv='red',
               col.strip.background='orange',
               xlab='Component',
               ylab=expression(R^2))

[Package windows.pls version 0.1.0 Index]