mm_get_interval: Create equallly spaced intervals.

View source: R/align.R

mm_get_intervalR Documentation

Create equallly spaced intervals.

Description

Create a sequence from -1:1 of specified length. MIDpoint (day0) can be

Usage

mm_get_interval(days, day0 = NULL)

Arguments

days

The length of the sequence to return, inclusive of the endpoints (-1,1)

day0

If NULL (default), the median integer will be calculated, centering the range on 0. Specifying a value will set 0 to that value, creating asymmetric ranges.

Value

Returns a numeric vector of specified length, ranging from -1 to 1

Examples

mm_get_interval(15) ## Symmetrical sequence from -1 to 1 with 0 in the middle.
mm_get_interval(15, day0 = 8) ## The same sequence, explicitly specifying the midpoint
mm_get_interval(15, day0 = 3) ## 15 divisions with an asymmetric distribution.


ehrlichd/moRphomenses documentation built on Dec. 13, 2024, 8:36 a.m.