ee=:(129;144;51582.8125;7);<128;143;51545.3125;22
If you define a verb which combines the first two boxes of list of
numbers, for example:
((2 ;@{. ]);2 }.]) 1{:: ee
+-------+-------+--+
|128 143|51545.3|22|
+-------+-------+--+
You can apply that at level 1 of your noun using L:1
((2 ;@{. ]);2 }.])L:1 ee
+-------------------+--------------------+
|+-------+-------+-+|+-------+-------+--+|
||129 144|51582.8|7|||128 143|51545.3|22||
|+-------+-------+-+|+-------+-------+--+|
+-------------------+--------------------+
Likewise, if you define a verb which operates on the numbers you're
interested in, for example:
(- 5e4 * 50e3&< * 52e3&>) ;;ee
129 144 1582.81 7 128 143 1545.31 22
You can apply that to the numbers in the original structure using L:0,
for example:
(- 5e4 * 50e3&< * 52e3&>)L:0 ee
+-------------------+--------------------+
|+---+---+-------+-+|+---+---+-------+--+|
||129|144|1582.81|7|||128|143|1545.31|22||
|+---+---+-------+-+|+---+---+-------+--+|
+-------------------+--------------------+
I hope this helps,
--
Raul
On Fri, Mar 20, 2020 at 9:01 AM Rudolf Sykora <[email protected]> wrote:
>
> Dear list,
>
>
> say I have a variable
> ee
> +----------------------+-----------------------+
> |+---+---+----------+-+|+---+---+----------+--+|
> ||129|144|51582.8125|7|||128|143|51545.3125|22||
> |+---+---+----------+-+|+---+---+----------+--+|
> +----------------------+-----------------------+
>
> how can I
> 1) join the first two boxes on level 0 into a single box, ie. get
>
> +----------------------+-----------------------+
> |+---+---+----------+-+|+---+---+----------+--+|
> ||129 144|51582.8125|7|||128 143|51545.3125|22||
> |+---+---+----------+-+|+---+---+----------+--+|
> +----------------------+-----------------------+
>
> 2) do an arithmetic operation on the 'position of big numbers of about
> 51000', ie. the 3rd box on level 0 of the original variable; eg. I want
> to subtract 50000 from them...
>
> ?
>
> Thank you for comments!
> Rudolf Sykora
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm