Skip to contents

Creates a numerical sequence which is centered in the first argument and extends in leght of the second argument into both positive and negative directions.

Usage

window_around(position, windowLength)

Arguments

position

integer. Center of sequence

windowLength

integer. Length of both downstream and upstream flanks

Value

integer

Examples

# Numeric interval centered in 10, with 5 closest negative
# and positive integers
window_around(10, 5)
#>  [1]  5  6  7  8  9 10 11 12 13 14 15