apply_slide_window: Apply a function to each window in a sliding window

Description Usage Arguments Value

Description

Apply a function to each window in a sliding window

Usage

1
2
apply_slide_window(data, f, key = NULL, w_size = 10, .to = ".out",
  .keep_data = T, ...)

Arguments

data

A data.frame or list of data points to partition

f

function to apply to each window

key

Column name to use a key when partitioning, used only when data is data.frame

w_size

Size of the sliding window

.to

Name of the column to store the function values in

.keep_data

whether to keep the partitioned data (defaults to TRUE)

...

Arguments that should be passed to the slide_window function

Value

A nested data.frame with data partitioned in the data column, a 'key' column containing windows keys and 'w_size' with window size and a column named after f or the value specified in .to containing the value using the function f


jjongbloets/slideR documentation built on May 19, 2019, 11:40 a.m.