bin: Bin the continuous data.

Description Usage Arguments Details Value

View source: R/npfixedcompR.R

Description

Bin the continuous data.

Usage

1
bin(data, order = -5)

Arguments

data

the observation to be binned.

order

see the details

Details

This function bins the continuous data using the equal-width bin in order to speed up some functions in this package.

h is taken as 10^(-order)

the observations are rounded down to the bins ..., -h, 0, h, ...

To further speed up the process, omit the bin that has 0 count.

Value

a list with v be the representative value of each bin and w be the count in the corresponding bin.


xiangjiexue/npfixedcompR documentation built on Jan. 1, 2021, 11:39 p.m.