Skip to content
Prev 390911 / 398506 Next

Continuous variable into levels

Hello,

And ?findInterval is faster than hist.

findInterval(x, c(-Inf, 500, 1000, 5000))

Also, before the cut code, the OP wrote


if value is between 1-100 do something


but in the breaks vector there's no 100. I guess this is not important, 
though, only the function to bin the data is.

Hope this helps,

Rui Barradas

?s 22:38 de 03/03/2022, Jim Lemon escreveu: