View source: R/convolution_fft.R
fftw_convolve | R Documentation |
Designed to be used for fast centered moving averages
fftw_convolve(x, y, normalize = TRUE, align = "center")
x |
the data series |
y |
the filter |
normalize |
do you want the filter normalized |
align |
what alignment |
convolution of data series and filter
set.seed(37) len <- 999 x <- cumsum(rnorm(len)) y <- rep(1, 3) sub <- c(1, 50) plot(1:len, x, type='o', pch = 20, xlim = sub, cex = 0.4) points(1:len, fftw_convolve(x, y), type = 'o', col='red', pch = 20, cex = 0.4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.