showALSresult: Plot ALS results in a more elaborate way

Description Usage Arguments Author(s) See Also Examples

View source: R/showALSresult.R

Description

Simultaneous visualization of pure components (spectra and time profiles) and either raw data, fitted data or residuals.

Usage

1
2
3
4
5
6
7
8
9
showALSresult(xals, xlst,
              tp = getTime(xals), wl = getWavelength(xals),
              mat.idx = 1:length(xlst),
              img.col = terrain.colors(10), zlim, xlab, ylab,
              compound.col = 1:ncol(xals$S), logsc = TRUE,
              plotPureC = c("both", "spec", "conc", "none"),
              titles, annotation = show.img,
              PureChght = 0.33, PureCwdth = min(nplot, 5)/5 - 0.1,
              show.img = TRUE)

Arguments

xals

The fitted ALS object. Not needed if plotPureC equals "none": in that case only the data are shown.

xlst

The data: the list of matrices on which the ALS object is based.

tp

Optional vector of time points. If missing, will be determined using function getTime.

wl

Optional vector of wavelengths. If missing, will be determined using function getWavelength.

mat.idx

Indices of the samples to be visualized.

img.col

Color vector for image.

zlim

Range of the image colors.

xlab, ylab

Axis annotation strings.

compound.col

Colors to be used for components in the pure specta/profile plots.

logsc

Logical, indicating whether the images should be logscaled vefore visualization. Default: TRUE.

plotPureC

Determines which part (if any) of the pure components is shown.

titles

Titles for the plots for the individual samples. If not given, the names of the xlst elements will be used.

annotation

if a text string, this will be shown in the top right corner panel. If anything else but FALSE, a color bar will be drawn. The default is to show the color bar for images and not to show it for contour plots.

PureChght

Height, relative to the height of the data panels, of the top row of pure concentration profiles

PureCwdth

Width, relative to the width of the data panels, of the right column of pure spectra

show.img

logical, indicating whether image is used (the default) or contour

Author(s)

Ron Wehrens

See Also

plot.ALS

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(teaMerged)

ncomp <- ncol(teaMerged$S)
myPalette <- colorRampPalette(c("black", "red", "blue", "green"))
mycols <- myPalette(ncomp)

maxResid <- max(abs(range(teaMerged$resid)))
showALSresult(teaMerged, teaMerged$resid,
              compound.col = mycols, logsc = FALSE, img.col = cm.colors(9),
              mat.idx = 2:4, zlim =c(-maxResid, maxResid))

Example output

Loading required package: ALS
Loading required package: nnls
Loading required package: Iso
Iso 0.0-17
Loading required package: ptw

alsace documentation built on Nov. 8, 2020, 5:54 p.m.