Learn R Programming

FAVA (version 1.0.9)

window_list: 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)

Value

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

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.

Examples

Run this code
window_list(window_size = 6, length = 40)
window_list(window_size = 6, length = 40, window_step = 2)

Run the code above in your browser using DataLab