Hi all!
I wrote a script years ago, and it has some flaws that I'm not sure how to correct. It's pretty simple. I take a single column of data and split it into 3-5 columns of as close to equal as possible. It's a weight column- things amongst friends. We get a number of things of various weights and try to split it between us. The problem I'm having is that I didn't incorporate a way to acknowledge an uneven number. For example, if I have 150 things split 5 ways- it works. If I have 153 things split 5 ways, it goes haywire. I haven't scripted in almost a decade and cannot for the life of me remember or figure out how to have an "orphan" column- a place where the things that don't divide equally go. HELP!
I have JMP 18
I've added my script and a sample table with an uneven distribution.
What I would like to see is the most even distribution possible, with another column for the rows (objects) that don't figure in.