R: Produce offsets such that points are sorted with most extreme...

topBottomDistribute {vipor} | R Documentation

## Produce offsets such that points are sorted with most extreme values to right and left

### Description

Produce offsets to generate smile-like or frown-like distributions of points. That is sorting the points so that the most extreme values alternate between the left and right e.g. (max,3rd max,...,4th max, 2nd max). The function returns either a proportion between 0 and 1 (useful for plotting) or an order

### Usage

    topBottomDistribute(x, frowney = FALSE, prop = TRUE)

### Arguments

`x` | the elements to be sorted
`frowney` | if TRUE then sort minimums to the outside, otherwise sort maximums to the outside
`prop` | if FALSE then return an ordering of the data with extremes on the outside. If TRUE then return a sequence between 0 and 1 sorted by the ordering

### Value

a vector of the same length as x with values ranging between 0 and 1 if prop is TRUE or an ordering of 1 to length(x)

### Examples

    topBottomDistribute(1:10)
    topBottomDistribute(1:10,TRUE)

[Package vipor version 0.4.5 Index]