mosaic (version 1.9.1)

mid: midpoints along a sequence

Description

Compute a vector of midpoints between values in a numeric vector

Usage

mid(x)

Value

a vector of length 1 less than x

Arguments

x

a numeric vector

Examples

Run this code
mid(1:5)
mid((1:5)^2)

Run the code above in your browser using DataLab