midpoints: Determine the midpoints between a vector of numbers

Description Usage Arguments Value Author(s) Examples

Description

Determine the midpoints between a vector of numbers

Usage

1

Arguments

x

a numeric vector of length >= 2. if unsorted, then it will be sorted. NA's will be excluded.

Value

a numeric vector of midpoints, of length n-1

Author(s)

Mark Cowley, 30 June 2005

Examples

1
2
midpoints(c(1,5,9))
# [1] 3 7

drmjc/mjcbase documentation built on May 15, 2019, 2:27 p.m.