View source: R/binByNumElements.r
ch.binByNumElements | R Documentation |
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.
ch.binByNumElements(data, numBins)
data |
A numeric vector. |
numBins |
The number of bins you want the vector divided into. ' |
A vector of bins that match to the rows of "data".
ch.binByNumElements (rnorm(100, 10, 2), 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.