jonmcalder / refactor

:bookmark: Better factor handling for R
https://jonmcalder.github.io/refactor/
MIT License
3 stars 0 forks source link

bins with width of one #8

Closed lorenzwalthert closed 8 years ago

lorenzwalthert commented 8 years ago

Problem

When breaks are specified to closely together, bins of width one with ugly labels result, i.e. from cut(sample(10), breaks = c(1, 4, 6, 8, 9, 10)), we get levels 1-4 5-6 7-8 9-9 10-10

Solution

jonmcalder commented 8 years ago

Great stuff!