splitWithOverlap: Split Vector with Overlapping Segments

View source: R/genomic_bayes.R

splitWithOverlapR Documentation

Split Vector with Overlapping Segments

Description

Splits a vector into segments of a specified length with a specified overlap. The function returns a list where each element contains a segment of the vector.

Usage

splitWithOverlap(vec, seg.length, overlap)

Arguments

vec

A numeric or character vector to be split.

seg.length

An integer specifying the length of each segment.

overlap

An integer specifying the number of overlapping elements between consecutive segments.

Value

A list where each element is a segment of the input vector. The segments can overlap based on the specified overlap.


psoerensen/qgg documentation built on March 9, 2024, 10:02 p.m.