Hi Wacek,

Wacek Kusnierczyk schrieb:
... or gain a bit on performance by doing the threshold comparison on
the whole matrix just once at once:

    dd = d <= 1
    d[apply(d, 1, any), apply(d, 2, any)]

d[apply(dd, 1, any), apply(dd, 2, any)]

Or not?

Cheers,
Stephan

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to