getBin: Get bins of data points

Description Usage Arguments Value Examples

View source: R/getBin.R

Description

Get bins of data points

Usage

1
getBin(x, tbreak = NULL, tbreak.num = NULL, minVal = 0, maxVal = NULL)

Arguments

x

A vector of input data points

tbreak

A vector of break points

tbreak.num

Number of breaks

minVal

Under bound of the binning range

maxVal

Upper bound of the binning range

Value

A vector of bin values

Examples

1
2
3
4
5
6
7
set.seed(2015)
bp.vec=rBP(100,alp=0.6,bet=1.5,lam1=20,lam2=0.05)
# get 10 bins for the data
getBin(bp.vec,tbreak.num=10)
# get bins from a predefined tbreak
tbreak=getTbreak(bp.vec,tbreak.num=10,break.thres=10)
getBin(bp.vec,tbreak=tbreak)

nghiavtr/BPSC documentation built on May 23, 2019, 4:42 p.m.