Maybe this?

The longest learning for me with J was to internalize as automatic the idea that many primitives apply to ITEMS of a noun. The items of a list are easy. But the items of anything else are its highest dimension.

]a=. 3 4$i.12

0 1 2 3

4 5 6 7

8 9 10 11

 then:

]a=. 1 0 1#a

0 1 2 3

8 9 10 11

...because rows are now the items of the 2-d array "a"...etc. So your boolean intuition was correct.

Tony (a year younger than you, Harvey)

On 2020-05-19 8:55 a.m., HH PackRat wrote:
On 5/19/20, Michael Dykman <[email protected]> wrote:
In functional languages, you don't really delete so much as you make a
fresh copy absent of the undesirable elements.
Where you looking for this?

  ] a=. <"0 'abcdef'
┌─┬─┬─┬─┬─┬─┐
│a│b│c│d│e│f│
└─┴─┴─┴─┴─┴─┘
    0 0 1 1 0 1 # a
┌─┬─┬─┐
│c│d│f│
└─┴─┴─┘
That kind of thing is what gave me the idea of a boolean mask of some
type.  However, can this be carried over, applying to rows of a table
instead?  I'm thinking that it probably does in some way, but I want
confirmation on that.  Thanks for your response!

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

Reply via email to