This is a wrapper around the R `spectrum()`

function, which
returns spectral values that are adjusted so that the integral of those
values equals the variance of the input `x`

.

oceSpectrum(x, ...)

x | a univariate or multivariate time series, as for |
---|---|

... | extra arguments passed on to |

A spectrum that has values that integrate to the variance.

x <- rnorm(1e3) s <- spectrum(x, plot=FALSE) ss <- oce.spectrum(x, plot=FALSE) cat("variance of x=", var(x), "\n")#> variance of x= 0.9605793#> integral of spectrum= 0.4799936#> integral of oce.spectrum= 0.9605793