Learn R Programming

DescTools (version 0.99.6)

Midx: Find the Midpoints of a Numeric Vector

Description

Calculate the midpoints of a sequence of numbers.

Usage

Midx(x, first = NULL)

Arguments

x
the numeric vector
first
number which is to be inserted in the very beginning of the vector. Default is NULL, meaning nothing will be inserted.

Value

  • numeric vector with the calculated midpoins

Examples

Run this code
x <- c(1,3,6,7)
Midx(x)
Midx(x, 0)

Run the code above in your browser using DataLab