Description Usage Arguments Value Author(s) See Also Examples
Given a matrix of spectra, where each row gives the power at each frequency, create banded spectra by averaging across columns within frequency bands.
1  bandSpectra(spectra, breaks = NULL, labels = NULL, ...)

spectra 
A matrix of spectra with numeric column names (as returned by

breaks 
The break points between the frequency bands. 
labels 
Labels for the frequency bands. 
... 
Further arguments passed to cut. 
A matrix of banded spectra.
Heather Turner
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  ## apply to arbitrary matrix to average over column groups
M < matrix(1:12, 3, 4)
colnames(M) < 1:4
## aggregate first two and last two columns
## (colnames <= 2, or colnames > 2)
bandSpectra(M, breaks = 2)
## apply to clonidine experiment
data(clonidine)
colnames(clonidine$spectra)
banded < bandSpectra(clonidine$spectra, breaks = c(4, 8, 10, 13, 15, 20, 28),
labels = c("delta", "theta", "alpha1", "alpha2", "not named",
"beta1", "beta2", "gamma"))
## run gslcca
result < gslcca(banded, "Critical Exponential",
time = Time, treatment = Treatment, subject = Rat, separate = FALSE,
subject.smooth = 4, data = clonidine)
plot(result, "fitted")
plot(result, "signatures")

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.