Description Usage Arguments Details Value See Also Examples
Sometimes with integer data which is not uniformly distributed, a linear
color scale is not ideal. The function bin.ints
converts an integer
vector into a factor vector where each level corresponds to a range of
integers and the elements of x are evenly distributed (as much as possible)
across the factor levels.
1 | bin.ints(x, num.bins = 10)
|
x |
data to be binned |
num.bins |
number of bins to aim for |
This is a convenience function that makesuse of find.bins
and
label.bins
.
bin.ints
returns an ordered factor vector with appropriately
labeled levels.
find.bins
for determining bin breakpoints
label.bins
for bin labels suitable for a legend
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.