Description Usage Arguments Value See Also Examples
bin()
takes a vector x
and returns a character
vector of the same length, containing a binned version of x
.
Character, factor and logical vectors are coerced to character, while
numeric vectors are binned according to parameter specification. This includes
the number of desired bins, equally spaced vs. equally sized bins and the
percentiles to force as the max/min endpoints of the low/high bins.
NA
values in x
are returned as NA
character values.
1 2 3 4 5 |
x |
character, factor, logical or numeric vector |
numBins |
integer value >= 2; number of desired bins |
equalBinSize |
logical value; return equally sized ( |
minPct |
integer between 0 and 100 specifying a percentile to force as the max endpoint for the low (first) bin |
maxPct |
integer between 0 and 100 specifying a percentile to force as
the min endpoint for the high (last) bin (must be > |
A character vector containing binned values of x
.
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.