As I recall, at the time key was implemented, the total array ordering http://www.jsoftware.com/jwiki/Essays/The%20TAO%20of%20J has not yet been defined in J. If it were defined, I think ordering the results of /. according to the left argument (on top of grouping it according to the left argument) would have a strong case.
----- Original Message ----- From: Dan Bron <j...@bron.us> Date: Wednesday, September 22, 2010 11:37 Subject: Re: [Jprogramming] Classification problem To: 'Programming forum' <programming@jsoftware.com> > John wrote: > > (0 1 2=/f data) <@# data > > I wrote: > > Does (</.~ f) data do what you want? > > John wrote: > > is not quite what I wanted. I can get around the order > by sorting. I > > considered putting in "guide" values and then deleting them. > > This is the way I usually do it (e.g. (</.~&.(0 1 2&,) > f) ) , because > that's more dependable where you can get away with it, i.e. when > can specify > the (finite) universe of categories. On the other hand, if > the universe of > categories is defined as the output of f (not its theoretical > range, but its > concrete output) then I think /: is an elegant solution > (thank you for > showing it to me). ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm