This seems to do it.

    <"1,./><"0&.> a
 +-----+-----+-----+
 |+-+-+|+-+-+|+-+-+|
 ||0|a|||1|b|||2|c||
 |+-+-+|+-+-+|+-+-+|
 +-----+-----+-----+
 
    doit =: [: <"1 [: ,./ [: > <"0&.>
    doit a
 +-----+-----+-----+
 |+-+-+|+-+-+|+-+-+|
 ||0|a|||1|b|||2|c||
 |+-+-+|+-+-+|+-+-+|
 +-----+-----+-----+

--Kip Murray

Sent from my iPad

> On Oct 5, 2013, at 11:07 AM, 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

Reply via email to