Description Usage Arguments Details Value Examples
View source: R/subsegment_center.R
Takes a vector of numeric values and return a vector of numeric values that correspond to the centers of n subsegments.
1 | subsegment_center(x, n)
|
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. |
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.
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.
1 | subsegment_center(1:3, 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.