As for inserting, here's one way

insert=: 3 : 0
   'what where target'=. y
   expand=. (0$~#where) where}1$~(#target)+#where
   (what) where}expand#^:_1 target
)
    insert (999 999 999,:99 99 99);2 4;<i.6 3
0 1 2
3 4 5
999 999 999
6 7 8
99 99 99
9 10 11
12 13 14
15 16 17

Note that the "where" indexes refer to the positions in the result.

On Mon, 28 Apr 2008 22:11:38 -600, PackRat <[EMAIL PROTECTED]> wrote:
>
> My brain must have gone into hibernation or something for the past
> couple of hours: no matter how much I've searched the documentation and
> the forum archives, I cannot seem to find anything about deleting a row
> from an array or inserting a row into an array.  I was thinking that,
> instead of dropping sequential items from the beginning or end (as with
> "drop"), deleting would likely be along the line of a selected list of
> one or more items (such as rows) to drop.  (I suppose inserting would
> be analogous in some manner.)  However, try as I might, I couldn't find
> anything that would seem to be so simple, maybe even a primitive (and
> probably so obvious!)--hence, my frustration with myself.  Could some
> kind soul gently share how these would be done?  Thanks in advance!
>
> Harvey
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to