you can use ,: monadically to put a leading 1 shape on one of the rows, and then the others will "get in line" with ,
a4,~ a3 ,~ a2 ,~ a0 ,; a1 or a4,~ a3 ,~ a2 ,~ a0 , ,; a1 ----- Original Message ----- From: PackRat PackRat <[email protected]> To: Programming forum <[email protected]> Sent: Tuesday, January 5, 2016 1:21 PM Subject: [Jprogramming] "Gluing" rows together I do a lot of manipulations with stock market data and such (i.e., tabular data), and I often have to "rip apart" a table and then reassemble the rows again. The ripping apart is easy, but I've always been challenged when putting it back together because the result never came out the way I wanted (or expected). After much experimenting and mucking around, I came up with this (as an example): z=. (((a0 ,: a1) , a2) , a3) , a4 NB. "glue" rows together However, there always seems to be a better way to do things in J. Can anyone enlighten me with an improved explicit manner (NOT tacit) of doing this? Thanks in advance! Harvey ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
