powered by
Compute midpoints and endpoints from a vector.
midpoints (v) endpoints (v)
An integer/numeric vector.
The midpoints function returns a vector, with a length one less than the original vector.
The endpoints function returns a length two vector.
Unique-Related Functions
Sequence Properties (Other than unique-related properties).
Optimization-Related Functions
# NOT RUN { x <- 1:4 midpoints (x) endpoints (x) # }
Run the code above in your browser using DataLab