subsegment_center: Centers of subsegments

Description Usage Arguments Details Value Examples

View source: R/subsegment_center.R

Description

Takes a vector of numeric values and return a vector of numeric values that correspond to the centers of n subsegments.

Usage

1

Arguments

x

A vector of numeric values.

n

A vector on integer values specifying how many subsegments we wish per initial segment. It should either contain one sigle value or have the same length as x.

Details

The vector x = c(x1, x2, x3, x4, ...) is interpreted as the centers of segments [y1, y2], [y2, y3], [y3, y4], etc... The function splits each of these segments into a number of subsegments of equal size and return the center of these segments.

Value

A list of vectors of numeric values. Each slot of this list corresponds to a segments of x and contains the centers fo the subsegments.

Examples

1

choisy/mcstats documentation built on May 21, 2019, 3:08 a.m.