[R] threshold matrix

From: Alaios <alaios_at_yahoo.com>
Date: Fri, 29 Apr 2011 06:37:08 -0700 (PDT)


Dear all,
I have a quite big matrix which I would like to threshold. If the value is below threshold the cell should be zero and

if the value is over threshold the cell should be one

One really simple way to do that is two have a nested loop and check cell by cell.

The problem is that this seems to be really time consuming and ineficient.

What do you suggest me to try out?

I would like to thank you in advance for your help

Best Regards
Alex



R-help_at_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. Received on Fri 29 Apr 2011 - 13:48:29 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 29 Apr 2011 - 14:30:34 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive