blck: Rolling operations

Description Usage Arguments Value Examples

View source: R/083-blck.R

Description

Apply rolling operations over a moving window for size n and increment step.

Usage

1
2
3
blck(x, fn, n = 1L, fill = NA, align = "left", ...)

blck_data(x, n = 1L)

Arguments

x

[univariate vector]

Univariate vector, numeric or ts object with only one dimension.

fn

[function]

n

[positive integer(1):1L]

Window size.

fill

[numeric or function: NA]

Numeric value(s) or function used to fill observations.

align

[character(1): "left"]

Specifying whether the index of the result should be left- or right-aligned or centered (default) compared to the rolling window of observations.

...

Additional arguments passed to the function fn.

Value

Examples

1
x <- seq(10, 1, -1)

kvasilopoulos/transx documentation built on Jan. 26, 2021, 6:14 p.m.