Last data update: 2014.03.03

R: Results of an ALS analysis on individual windows
teaMergedR Documentation

Results of an ALS analysis on individual windows

Description

Object of class ALS: the result of the analysis of the tea data, using three time windows with an overlap parameter of 10. The three ALS models have been merged into one ALS object, which can be inspected and used for further analysis.

Usage

data(teaMerged)

Examples

## generation of the data
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)
tea.alslist <- lapply(tea.split,
                      function(Xl) {
                        Xl.opa <- opa(Xl, 4)
                        doALS(Xl, Xl.opa)
                      })
teaMerged <- mergeTimeWindows(tea.alslist)
## This is the object saved in teaMerged.RData

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

plot(teaMerged, what = "spectra", col = mycols)
legend("top", col = mycols, lty = 1, bty = "n", ncol = 2,
       legend = paste("C", 1:ncol(teaMerged$S)))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(alsace)
Loading required package: ALS
Loading required package: nnls
Loading required package: Iso
Iso 0.0-17
Loading required package: ptw
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/alsace/teaMerged.Rd_%03d_medium.png", width=480, height=480)
> ### Name: teaMerged
> ### Title: Results of an ALS analysis on individual windows
> ### Aliases: teaMerged
> ### Keywords: datasets
> 
> ### ** Examples
> 
> ## generation of the data
> 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)
> tea.alslist <- lapply(tea.split,
+                       function(Xl) {
+                         Xl.opa <- opa(Xl, 4)
+                         doALS(Xl, Xl.opa)
+                       })
> teaMerged <- mergeTimeWindows(tea.alslist)
> ## This is the object saved in teaMerged.RData
> 
> ncomp <- ncol(teaMerged$S)
> myPalette <- colorRampPalette(c("black", "red", "blue", "green"))
> mycols <- myPalette(ncomp)
> 
> plot(teaMerged, what = "spectra", col = mycols)
> legend("top", col = mycols, lty = 1, bty = "n", ncol = 2,
+        legend = paste("C", 1:ncol(teaMerged$S)))
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>