get_midpoints: Get midpoint

View source: R/utils.R

get_midpointsR Documentation

Get midpoint

Description

A helper function that returns a vector of q equally spaced points within the intervals specified by x_breaks

Usage

get_midpoints(x_breaks, q = 1)

Arguments

x_breaks

a (n+1) vector defining a partition of an interval

q

an integer specifying the number of points within interval

Value

an n vector of the midpoints of x_breaks

Examples

x_breaks <- c(0, 2, 3, 5, 8)
x_mid <- get_midpoints(x_breaks)

PeteyCoco/ppdeconv documentation built on March 21, 2022, 5:35 a.m.