Here's one approach:
<"1|:><@{."1 L:0 (< _1]\ 0 1 2), (< _1]\ 'a','b','c')
Note that your original form has 2 boxes and the contents of the boxes
have shape 3 1, while your final form has 3 boxes and the contents of
those boxes have shape 2. So we have to do something arbitrary to get
rid of the "1" dimension.
Note also that the intermediate form produced by
<@{."1 L:0 array
could also have been produced by
]&.>@,&.> array
Thanks,
--
Raul
On Sat, Oct 5, 2013 at 12:07 PM, Joe Bogner <[email protected]> wrote:
> Given this structure:
> ]a =. (< _1]\ 0 1 2), (< _1]\ 'a','b','c')
>
> +-+-+
>
> |0|a|
>
> |1|b|
>
> |2|c|
>
> +-+-+
>
>
> How can I transform it into this?
>
>
> (0;'a');(1;'b');<(2;'c')
>
>
> +-----+-----+-----+
>
> |+-+-+|+-+-+|+-+-+|
>
> ||0|a|||1|b|||2|c||
>
> |+-+-+|+-+-+|+-+-+|
>
> +-----+-----+-----+
>
>
> I've tried every variant in indexing and selecting to no avail. Thank you
>
>
> http://www.jsoftware.com/help/jforc/more_verbs_for_boxes.htm
>
> http://www.jsoftware.com/docs/help701/learning/06.htm
>
> http://www.jsoftware.com/help/primer/from_boxed_indexes.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm