ch.binByNumElements: A function bins a vector of numbers

View source: R/binByNumElements.r

ch.binByNumElementsR Documentation

A function bins a vector of numbers

Description

This function creates N bins for a vector of numbers. It equalized the number of elements in each bin, so the intervals the each bin contains may vary based on the distribution of data. The bins are labeled by the average value of the items in the bin.

Usage

ch.binByNumElements(data, numBins)

Arguments

data

A numeric vector.

numBins

The number of bins you want the vector divided into. '

Value

A vector of bins that match to the rows of "data".

Examples

ch.binByNumElements (rnorm(100, 10, 2), 10)

ccpluncw/ccpl_R_chutils documentation built on Nov. 22, 2024, 5:18 a.m.