View source: R/future_kernapply.R
future_kernapply | R Documentation |
future_kernapply()
is a futurized version of
stats::kernapply()
, i.e. it computes, in parallel, the
convolution between an input sequence and a specific kernel.
Parallelization takes place over columns when x
is a matrix,
including a ts
matrix.
future_kernapply(x, ...)
## Default S3 method:
future_kernapply(x, k, circular = FALSE, ...)
## S3 method for class 'ts'
future_kernapply(x, k, circular = FALSE, ...)
x |
an input vector, matrix, time series or kernel to be smoothed. |
... |
arguments passed to or from other methods. |
k |
smoothing |
circular |
a logical indicating whether the input sequence to be smoothed is treated as circular, i.e., periodic. |
See stats::kernapply()
for details.
library(datasets)
library(stats)
X <- EuStockMarkets[, 1:2]
k <- kernel("daniell", 50) # a long moving average
X_smooth <- future_kernapply(X, k = k)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.