apply_slide_windows: Apply a function to each window in sliding windows of...

Description Usage Arguments Value

View source: R/slide.R

Description

Apply a function to each window in sliding windows of different sizes.

Usage

1
2
apply_slide_windows(data, f, key = NULL, w_sizes = 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_sizes

Sizes of the sliding windows

.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 Feb. 14, 2018, 1:24 p.m.