Skip to content
Prev 384059 / 398502 Next

min rows multiplication by the max rows

Please post using plain text format... otherwise what we see can be corrupted as compared to what you saw.

The obvious solution is:

apply( M, 1, min ) * apply( N, 1, max )

but Google sez there is an optimized version useful with large matrices:

library( Rfast )
rowMins( M ) * rowMins( N )

(untested)
On May 23, 2020 7:30:48 AM PDT, Vahid Borji <vahid.borji65 at gmail.com> wrote: