I\'m having trouble finding a function in R that performs equal-frequency discretization. I stumbled on the \'infotheo\' package, but after some testing I found that the al
Here is a one liner solution inspired by @Joris' answer:
x <- rpois(50,5) binSize <- 5 desiredFrequency = floor(length(x)/binSize) split(sort(x), rep(1:binSize, rep(desiredFrequency, binSize)))