Skip to content
Prev 389247 / 398506 Next

Improvement: function cut

I disagree, I don't really think it's too long or ugly, but if you think it
is, you could abbreviate it as 'i'.


x <- 0:20
breaks1 <- seq.int(0, 16, 4)
breaks2 <- seq.int(0, 20, 4)
data.frame(
    cut(x, breaks1, right = FALSE, i = TRUE),
    cut(x, breaks2, right = FALSE, i = TRUE),
    check.names = FALSE
)


I hope this helps.
On Fri, Sep 17, 2021 at 6:26 PM Leonard Mada <leo.mada at syonic.eu> wrote: