Full_Name: Jimmy Shadbolt Version: 1.5.1 and 1.6 OS: linux Submission from: (NULL) (194.217.93.241) The code for spec.pgram contains the following: for (i in 1:ncol(x)) { for (j in 1:ncol(x)) { pgram[, i, j] <- xfft[, i] * Conj(xfft[, j])/(N*xfreq) } } ## value at zero is invalid as mean has been removed, so interpolate pgram[1, i, j] <- 0.5*(pgram[2, i, j] + pgram[N, i, j]) Surely the last line should be inside the loops (and apply to all spectra, not just the last)? -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._