edges: Get the two-sided end points

Description Usage Arguments Value

View source: R/detect-peak.R

Description

Centered at the i-th bin, find the bin hald_width away to the left and to the right; Truncate at the 1st or the biggest bin when hitting the boundary. Essential for evaluating if a bin is likely to be the location of a peak (aka band)

Usage

1
edges(i, half_width, n)

Arguments

i

i-th bin

half_width

The number of bins to the left or right of the current bin (specified by parameter i)

n

The total number of bins

Value

A vector of length two, representing the left and right interval end points


oslerinhealth/spotgear documentation built on May 25, 2021, 10:38 p.m.