Description Usage Arguments Details Value Author(s) See Also Examples

Wrapper function for the `als`

function in the ALS
package, providing a simple interface with sensible defaults for
hyphenated data.

1 2 3 4 5 6 7 8 9 10 |

`Xl` |
a list of (numerical) data matrices. Missing values are not allowed. |

`x, object` |
an object of class ALS. |

`PureS` |
Initial estimates of pure spectral components. |

`maxiter` |
maximum number of iterations in ALS. |

`what` |
Show spectra or elution profiles |

`showWindows` |
If showing elution profiles, the window borders and the overlap areas between the windows can be shown (by default). Simply set this parameter to FALSE if this is undesired. |

`mat.idx` |
If showing elution profiles, one can provide the index of the sample(s) that should be shown. For every sample one plot will be made. Default is to show all. |

`comp.idx` |
Indices of components to be shown. Default is to show all components. |

`xlab, ylab, main, ...` |
self-explanatory optional arguments |

The `plot`

method can be used to plot the spectral
components (one plot for the model) or the elution profiles (one plot
for each data matrix, so usually several plots). The `summary`

method also returns fit statistics like LOF, R2 and RMS. Extractor
functions `getTime`

and `getWavelength`

provide the vectors
of time points and wavelengths from the `ALS`

object.

Function `doALS`

returns an object of class "ALS", a list
with the following fields:

`CList` |
a list of matrices with the elution profiles in the columns. Every matrix in this list corresponds with a matrix in the input. |

`S` |
a matrix with the spectral components in the columns. These are common for all data matrices. |

`rss` |
residual sum of squares. |

`resid` |
a list of residual matrices. |

`iter` |
number of iterations. |

`summ.stats` |
summary statistics, providing more information about the fit quality. |

See the `als`

function for more details; only the
`summ.stats`

field is not part of the original `als`

output.

Ron Wehrens

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
data(tea)
new.lambdas <- seq(260, 500, by = 2)
tea <- lapply(tea.raw, preprocess, dim2 = new.lambdas)
tea.split <- splitTimeWindow(tea, c(12, 14), overlap = 10)
Xl <- tea.split[[2]]
Xl.opa <- opa(Xl, 4)
Xl.als <- doALS(Xl, Xl.opa)
Xl.als
summary(Xl.als)
plot(Xl.als, "spectra")
par(mfrow = c(1, 3))
plot(Xl.als, "profiles", ylim = c(0, 600), mat.idx = 1:3)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.