cfilter | R Documentation |
Applies a convolution filter to a univariate time series.
cfilter(x, filter, sides, circular)
x |
A |
filter |
A |
sides |
An |
circular |
A |
This is a port of the cfilter function harnessed by the filter function in stats. It is about 5-7 times faster than R's base function. The benchmark was done on iMac Late 2013 using vecLib as the BLAS.
A column vec
that contains the results of the filtering process.
R Core Team and JJB
x = 1:15 # cfilter(x, rep(1, 3), sides = 2, circular = FALSE) # Using R's function filter(x, rep(1, 3)) # cfilter(x, rep(1, 3), sides = 1, circular = FALSE) # Using R's function filter(x, rep(1, 3), sides = 1) # cfilter(x, rep(1, 3), sides = 1, circular = TRUE) # Using R's function filter(x, rep(1, 3), sides = 1, circular = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.