vbin: Bined vector

Description Usage Arguments Value See Also Examples

Description

Bin a vector into n intervals in regard with its value range. The vector x is split into n bins within [min(x), max(x)], and bin index is given by checking the bin [bin_min, bin_max) into which data points in x fall.

Usage

1
vbin(x, n, type = "i")

Arguments

x

A vector to bin

n

Number of bins

type

Interval representation form, c("i", "c")

Value

Interval index if type is "i"; interval center point if type is "c".

See Also

Other converting functions: rangebinc; vbingrid

Examples

1
vbin(seq(1:10), 3)

caesar0301/omniR documentation built on May 13, 2019, 10:38 a.m.