Arguments
datalist
A list of (numerical) data matrices
splitpoints
A numerical vector of cut points. In case the time
axis extends beyond the range of the cut points, additional cut
points are added at the beginning or at the end of the time axis to
ensure that all time points are taken into account.
overlap
Number of points in the overlap region between two
consecutive windows. Default: 0 (non-overlapping windows).
obj
Either experimental data that have been split up in
different time windows (a list of matrices), or a list of ALS
objects. See details section.
simSThreshold, simCThreshold
similarity thresholds to determine
whether two patterns are the same (correlation). The two thresholds
are checking the spectral and chromatographic components,
respectively. If no overlap is present between time windows,
simCThreshold
is not used.
verbose
logical: print additional information?
Examples
## splitting and merging of data files
data(tea)
tea.split <- splitTimeWindow(tea.raw, c(12, 14))
names(tea.split)
sapply(tea.split, length)
lapply(tea.split, function(x) sapply(x, dim))
rownames(tea.split[[1]][[1]])[1:10]
rownames(tea.split[[2]][[1]])[1:10]
tea.merge <- mergeTimeWindows(tea.split)
all.equal(tea.merge, tea.raw) ## should be TRUE
tea.split2 <- splitTimeWindow(tea.raw, c(12, 14), overlap = 10)
lapply(tea.split2, function(x) sapply(x, dim))
tea.merge2 <- mergeTimeWindows(tea.split2)
all.equal(tea.merge2, tea.raw) ## should be TRUE
## merging of ALS results
data(teaMerged)
ncomp <- ncol(teaMerged$S)
myPalette <- colorRampPalette(c("black", "red", "blue", "green"))
mycols <- myPalette(ncomp)
## show spectra - plotting only a few of them is much more clear...
plot(teaMerged, what = "spectra", col = mycols, comp.idx = c(2, 6))
legend("top", col = mycols[c(2, 6)], lty = 1, bty = "n",
legend = paste("C", c(2, 6)))
## show concentration profiles - all six files
plot(teaMerged, what = "profiles", col = mycols)
## only the second file
plot(teaMerged, what = "profiles", mat.idx = 2, col = mycols)
legend("topleft", col = mycols, lty = 1, bty = "n",
legend = paste("C", 1:ncol(teaMerged$S)))
## Note that components 2 and 6 are continuous across the window borders
## - these are found in all three windows