mosaic (version 1.1.0)

mid: midpoints along a sequence

Description

Compute a vector of midpoints between values in a numeric vector

Usage

mid(x)

Arguments

x

a numeric vector

Value

a vector of length 1 less than x

Examples

Run this code
# NOT RUN {
mid(1:5)
mid((1:5)^2)
# }

Run the code above in your browser using DataCamp Workspace