in reply to Re: placing values into bins
in thread placing values into bins

Hi there. Thanks for your replies so far. Much appreciated.
But what if I wanted to choose 125.5-130.0 and 456.5-457.0 as a range for example? How simple would that be to do?

Replies are listed 'Best First'.
Re^3: placing values into bins
by tlm (Prior) on Apr 28, 2005 at 13:18 UTC

    If you follow the approach I sketched out in my other reply, all you need to do is pick the "left ends" of the ranges (in this case 125.5 and 456.5), and the desired bin widths; perl takes care of the right ends of the ranges depending on the actual data.

    the lowliest monk

Re^3: placing values into bins
by mrborisguy (Hermit) on Apr 28, 2005 at 14:05 UTC
    if you want to use the int method, but decide you want to use different sized bins, my simple solution would to be to create a new sub that returned the left end of the range, and just replace 'int' with that sub.