fftw_convolve: fftw_convolve

Description Usage Arguments Value Examples

View source: R/convolution_fft.R

Description

Designed to be used for fast centered moving averages

Usage

1
fftw_convolve(x, y, normalize = TRUE, align = "center")

Arguments

x

the data series

y

the filter

normalize

do you want the filter normalized

align

what alignment

Value

convolution of data series and filter

Examples

1
2
3
4
5
6
7
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)

jkennel/aquifer documentation built on Dec. 25, 2019, 9:25 a.m.