Sherlock, Ric wrote:
> I've tried to define a verb melt that generalises the technique for an
> arbitrary number of ID columns. It seems to work except that I have an
> extra level of boxing around the ID columns. How best to remove them? (I
> figure once that's solved then the labels will match at the top OK too!)

You can use { (catalog) with a list of arguments to build the labels, e.g.

   >,{(100+i.2);(5*i.3);21+i.4
100  0 21
100  0 22
100  0 23
100  0 24
100  5 21
100  5 22
100  5 23
100  5 24
100 10 21

Your problem is that you only use catalog with two arguments, and each
item of the first is boxed, while each item of the second is open.

Also, it just seems easier to separate the labels from the data, i.e.
write a verb of the form:

   meltdown=: 4 : '(>,{x),.,y'

   ((100+i.2);22+i.3) meltdown i.2 3
100 22 0
100 23 1
100 24 2
101 22 3
101 23 4
101 24 5

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to