get_sliding_windows: Generate sliding windows

View source: R/get_sliding_windows.R

get_sliding_windowsR Documentation

Generate sliding windows

Description

Generate sliding windows

Usage

get_sliding_windows(from, to, n, size, intervals = TRUE)

Arguments

from, to

The bounds of the range to slide across

n

The number of bins in which to split the range

size

The size of the sliding window, in number of bins

intervals

See the "Value" section

Value

If intervals = TRUE, a list of window ranges. Otherwise, a list of two vectors: a vector of lower bounds and a vector of upper bounds for each window.

Examples


get_sliding_windows(0, 10, 10, 2)


rscherrer/speciomx documentation built on March 28, 2023, 8:49 p.m.