# Load sample data as in Load() example:
example(Load)
ensmod <- MeanDims(sampleData$mod, 2)
spectrum <- Spectrum(ensmod)
for (jsdate in 1:dim(spectrum)['sdate']) {
for (jlen in 1:dim(spectrum)['ftime']) {
if (spectrum[jlen, 2, 1, jsdate] > spectrum[jlen, 3, 1, jsdate]) {
ensmod[1, jsdate, ] <- Filter(ensmod[1, jsdate, ], spectrum[jlen, 1, 1, jsdate])
}
}
}
# \donttest{
PlotAno(InsertDim(ensmod, 2, 1), sdates = startDates)
# }
Run the code above in your browser using DataLab