window_list: Generate sliding windows of specified length given the...

View source: R/window_fava.R

window_listR Documentation

Generate sliding windows of specified length given the maximum number of samples

Description

This function generates a list of of sliding windows conditional on two parameters: the length of each window (number of samples) and the total number of samples present in the data.

Usage

window_list(window_size, length, window_step = 1)

Arguments

window_size

An integer number specifying the number of samples per window.

length

An integer number specifying the total number of samples.

window_step

Optional; an integer number specifying the distance between the first entry of adjacent windows. Default is window_step=1.

Value

A list of samples of sample indices. Each list entry represents one window.

Examples

window_list(window_size = 6, length = 40)
window_list(window_size = 6, length = 40, window_step = 2)

FAVA documentation built on April 4, 2025, 4:47 a.m.